-
Notifications
You must be signed in to change notification settings - Fork 39
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
defaultProps being deprecated #66
Comments
I get this warning and nothing renders. Is this the same for you @ethan-carlson or do you get the component rendering? Just using the example code (replaced the json url with the actual json array) |
It is just a warning, the functionality will not affect due to this issue |
In that case, I've added a new issue |
Any idea hot to fix or any library to get it on nextjs 13 ? |
Hello @marcuspx I am currently, working on it. please wait for sometime. |
Hi, I am using Nextjs 14, in my localhost everything works fine , but after switching browser tabs, the highlighted portions dissapears (even after setting |
Hello @ethan-carlson, this issue is resolved in the newer pre-release Please check https://www.npmjs.com/package/react-img-mapper/v/2.0.0-alpha.1 Related to the Next.js highlighting issue, please create a separate one Thanks :) |
@ronalddas ,for some reason in Local is showing the error but on production is not, no idea why but I'll wait for the stable version on nextjs from @NishargShah |
Hello @marcuspx, in the alpha version, it is resolved. Please wait till the stable release if you are using this package in any real projects |
This is not a solution but just a work around for this issue. This just hides the warning.
|
Describe the bug
React defaultProps is scheduled to be deprecated in the next major release, 18.3: see here
To Reproduce
Steps to reproduce the behavior:
Mounting ImageMapper with React 18.2 generates this warning.
Error Stack
Warning: ImageMapper: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. at ImageMapper (webpack-internal:///(app-client)/./node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/react-img-mapper/dist/ImageMapper.js:60:30)
Expected behavior
Change the default props syntax to the ES6 standard to remove this warning and prevent future bugs. See an example in this thread.
Screenshots
N/A
The text was updated successfully, but these errors were encountered: