You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[x] Other... Please describe:
defaultProps currently deprecated and will be removed in React 18.3.0
Current behavior
// Example from LineChart.tsximportReact,{FC}from'react';import{AreaChart,AreaChartProps}from'../AreaChart';import{LineSeries}from'./LineSeries';exporttypeLineChartProps=AreaChartProps;exportconstLineChart: FC<Partial<LineChartProps>>=(props)=>(<AreaChart{...props}/>);LineChart.defaultProps={
...AreaChart.defaultProps,series: <LineSeries/>};
Expected behavior
// Example from LineChart.tsximportReact,{FC}from'react';import{AreaChart,AreaChartProps}from'../AreaChart';import{LineSeries}from'./LineSeries';exporttypeLineChartProps=AreaChartProps;exportconstLineChart: FC<Partial<LineChartProps>>=({
series =<LineSeries/>,
...props})=><AreaChart{...props}/>;
What is the motivation / use case for changing the behavior?
defaultProps currently deprecated and will be removed in React 18.3.0
Unfortuantly the way the APIs are used it needs to be initialized via default props. We are going to need to re-evaluate our strategy for this in the upcoming release. Thanks for highlighting, if you are interested in contributing let me know.
I'm submitting a...
defaultProps currently deprecated and will be removed in React 18.3.0
Current behavior
Expected behavior
What is the motivation / use case for changing the behavior?
defaultProps currently deprecated and will be removed in React 18.3.0
Environment
The text was updated successfully, but these errors were encountered: