sanniassin / react-input-mask

Input masking component for React. Made with attention to UX.
MIT License
2.22k stars 258 forks source link

Make this lib Strict Mode compliant #198

Open gustavopch opened 4 years ago

gustavopch commented 4 years ago

Getting the following error when using this lib in Strict Mode:

Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of InputElement which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node

This line seems to be the cause: https://github.com/sanniassin/react-input-mask/blob/master/src/index.js#L270

This should be fixed to avoid issues with Concurrent Mode (which will soon be released):

In Concurrent Mode, the lifecycle methods previously marked as “unsafe” actually are unsafe, and lead to bugs even more than in today’s React. We don’t recommend trying Concurrent Mode until your app is Strict Mode-compatible.

igorprandini commented 4 years ago

I have the same problem! Any solution for this topic?

arashkay commented 4 years ago

Any ETA to fix this?

luisfagottani commented 4 years ago

any?

marcosem commented 4 years ago

Any news on this? Thank you!

fuale commented 4 years ago

Any news, meus camaradas?

lucascco commented 3 years ago

I think that this lib was abandoned... =(

ChrisCrossCrash commented 3 years ago

Are there any popular forks of this repository that is being actively maintained? It would be nice to get this fixed.

ianchanning commented 1 year ago

I have a fix for this here: https://github.com/sanniassin/react-input-mask/pull/308