Open ochavarria2u opened 4 months ago
We'll want to move away from using propTypes
as well https://react.dev/blog/2024/04/25/react-19-upgrade-guide#removed-proptypes-and-defaultprops
Thanks for flagging this, @ochavarria2u.
One important caveat we'll need to consider is how the Paragon docs site relies on propTypes
and defaultProps
to generate the props API sections for components (e.g., props API for Alert
) as well.
Feedback summary
Using React 18 I started to notice these warning messages for default props.
Warning: FormGroup: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
The console gets crowded with many of these messages, making it hard to check actual errors or any other important debug messages.
Improvements
Migrating default props to normal JS parameters.
CC: @adamstankiewicz