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
bug: Geting Error : Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
#261
Closed
HeppyAndriawan opened this issue
Apr 13, 2023
· 2 comments
First of all, I am creating the app using Next.js 13 with the app directory. During development I get an error while I use Switch, Default, and Case components from React-if and the error says:
" Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. "
Here is my code:
and when I delete the React-if component then the error disappears.
Also, regarding this announcement (reactjs/rfcs#107) that is true defaultProps will be moved to class render in React.
So can anyone update the module or tell me how to fix this error manually?
Thanks
The text was updated successfully, but these errors were encountered:
First of all, I am creating the app using Next.js 13 with the app directory. During development I get an error while I use Switch, Default, and Case components from React-if and the error says:
" Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. "
Here is my code:
and when I delete the React-if component then the error disappears.
Also, regarding this announcement (reactjs/rfcs#107) that is true defaultProps will be moved to class render in React.
So can anyone update the module or tell me how to fix this error manually?
Thanks
The text was updated successfully, but these errors were encountered: