-
Notifications
You must be signed in to change notification settings - Fork 77
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
Replace UNSAFE_componentWillMount
with constructor
#62
Comments
any chance we can get this merged in @gaearon ? this package is heavily used by |
@sabarasaba, there is https://github.com/iest/react-body-classname which is potentially impacted by this too. |
Renaming to constructor isn't the correct fix as it won't be properly compatible with concurrent mode, where the render phase (including the constructor) might be called more than once. |
Like Sophie says, this isn't the right fix. #63 (comment) |
This could be remedied by replacing
UNSAFE_componentWillMount
with aconstructor
definition, as that is the modern equivalent of using the now-deprecatedcomponentWillMount
. It will also avoid limiting your supported versions ofreact
, as it's both backwards and forwards compatible.react-side-effect/src/index.js
Line 70 in f1e0207
The text was updated successfully, but these errors were encountered: