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

Warning: componentWillReceiveProps has been renamed #166

Closed
wants to merge 4 commits into from
Closed

Warning: componentWillReceiveProps has been renamed #166

wants to merge 4 commits into from

Conversation

@graue
Copy link

graue commented Sep 23, 2019

This will make the lib incompatible with React 15.0 - 16.2. Better to just rename to UNSAFE_componentWillReceiveProps for now.

@ranneyd
Copy link
Contributor Author

ranneyd commented Sep 23, 2019

fair

@ranneyd
Copy link
Contributor Author

ranneyd commented Sep 23, 2019

#167

@TriStarGod
Copy link

Sorry, noob question. Why does it matter that replacing depreciated lifecycle methods make it incompatible with React 15.0 - 16.2 if older versions of this component are still available? Thanks!

@graue
Copy link

graue commented Nov 13, 2019

Because the incompatibility with React 15.0 - 16.2 would be a breaking change, semantic versioning would require incrementing the major version of this package.

Libraries that depend on this one, like react-select, would then not get the upgrade by default, and would have to also bump their major versions if they manually took the upgrade.

It's preferable to let everyone get the immediate benefit of the console spam going away without having to go through all that.

@TriStarGod
Copy link

So these types of breaking changes should only be performed when the major version is increased? Then the question becomes why wasn't there a major version change due to react's change. Seems like a tricky balance in keeping up to date with the latest changes and compatibility with other modules. Thanks for your input!

@jay-khatri
Copy link

I'm getting this error and I'm assuming its relevant to this thread.

index.js:1 Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state

Please update the following components: AutosizeInput

What type of work would require a compatible change?

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

Successfully merging this pull request may close these issues.

4 participants