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

Remove defaultProps for React 18.3.0 #6547

Closed
omermecitoglu opened this issue Feb 10, 2023 · 5 comments · Fixed by #6568
Closed

Remove defaultProps for React 18.3.0 #6547

omermecitoglu opened this issue Feb 10, 2023 · 5 comments · Fixed by #6568

Comments

@omermecitoglu
Copy link

Is your feature request related to a problem? Please describe

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

I started seeing this warning which is related to facebook/react#16210

Describe the solution you'd like

Using JavaScript default parameters instead of defaultProps

Describe alternatives you've considered

No response

Additional context

No response

@audriuiv
Copy link

audriuiv commented Mar 6, 2023

How to disable defaultProps error in components? I have a lot of errors

@kyletsang
Copy link
Member

We'll take a look at this after we merge the docusaurus PR. We need to ensure the documentation is generated properly after the default props changes.

@michal-th
Copy link

Is there any update on this @kyletsang ?

@cb-eli
Copy link

cb-eli commented May 13, 2024

Would this fix be available for react-bootstrap version 1.x (bootstrap 4.x)?

@kyletsang
Copy link
Member

Would this fix be available for react-bootstrap version 1.x (bootstrap 4.x)?

Unfortunately no, since that requires a heavy lift in updating RB as well as the underlying deps like react-overlays. There's also other React 19 changes, that we aren't fully compatible with yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants