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

Unknown Prop Warning #1071

Closed
goldmont opened this issue Mar 12, 2023 · 5 comments
Closed

Unknown Prop Warning #1071

goldmont opened this issue Mar 12, 2023 · 5 comments

Comments

@goldmont
Copy link

Hi,

In the latest release, Cropper's props are passed down to the HTML element and thus React complains about it. The error is the following:

Warning: React does not recognize the aspectRatio prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase aspectratio instead. If you accidentally passed it from a parent component, remove it from the DOM element.

This error is logged for every prop I set. Could you please solve it? Thanks.

@jcolombo
Copy link

Yup same here... props are all getting sent on to the DOM with one of the spreads or something instead of scrubbing out the unneeded props. Not sure we thats in this package or the Cropper.js itself but I definitely can't build to production with all those console errors. If it matters i am running React in Typescript and the Material UI library.

@shekhar-shubhendu
Copy link
Collaborator

Thanks for raising this. I will look into it

@goldmont
Copy link
Author

Thanks.

@shekhar-shubhendu
Copy link
Collaborator

shekhar-shubhendu commented Mar 14, 2023

@goldmont @jcolombo Please try the latest version 2.3.2. It should be fixed there.

@goldmont
Copy link
Author

It works, thanks!

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

3 participants