Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[React] Stop using defaultProps for compatibility with React 18.3+ #1838

Open
quicksketch opened this issue Sep 18, 2023 · 0 comments
Open

Comments

@quicksketch
Copy link

Using many of the React Mayflower components on a React 18.3+ projects will throw a warning upon starting the application such as this:

Warning: Image: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

Using defaultProps is deprecated (per facebook/react#25699) and should be replaced with normal JavaScript parameter defaults. There's a pretty good write up on the situation here: https://sophiabits.com/blog/stop-using-defaultprops

  • Mayflower version: 12.6.0
  • Operating system and version: Linux
@quicksketch quicksketch changed the title React: Stop using defaultProps for compatibility with React 18.3+ [React] Stop using defaultProps for compatibility with React 18.3+ Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant