chenglou / react-motion

A spring that solves your animation problems.
MIT License
21.68k stars 1.16k forks source link

componentWillReceiveProps warning with React 16.9 #569

Open alexbensimon opened 5 years ago

alexbensimon commented 5 years ago

Hello,

After updating react and react-dom to v16.9.0, this warning appears:

react-dom.development.js:11494 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks 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
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: Motion

According to https://reactjs.org/blog/2019/08/08/react-v16.9.0.html#renaming-unsafe-lifecycle-methods, the componentWillReceiveProps is now deprecated and will be removed from the API on the next major version.

klimashkin commented 5 years ago

It feels like the project has been abandoned by the owners. There was a PR https://github.com/chenglou/react-motion/pull/534, but didn't get through

juicylevel commented 4 years ago

2020 year..

nkbt commented 4 years ago

Yeah @juicylevel, I wish I could drop all the things of my life now (as in work, surfing, divorce, girlfriend) and do all the opensource...

On a side note: I've added a reminder to publish new version of react-motion which should have this fixed (at least temporarily). I'll let everyone know when it is published. You can help by teting current master branch in your real-world project and see if anything breaks.

jfroffice commented 4 years ago

Any update on this ?

comp615 commented 4 years ago

When is the reminder to publish set for? Are there any other maintainers who might be able to help you out and publish this in the meantime? I know it's annoying to have people nagging, but getting the newer React support updated would be super helpful! Thank you!

fabiomcosta commented 4 years ago

Ah interesting... so sounds like the change is already there and we just need a new version published to npm? If the maintainers give me the permissions I'll happily do that.

andresmatasuarez commented 4 years ago

yes, please!

LiteSoul commented 3 years ago

...and now it's 2021 🥺

RaddishIoW commented 3 years ago

Someone has forked react-motion to fix this issue: see this thread

onionhammer commented 3 years ago

Perhaps other projects should reference the fork

RaddishIoW commented 3 years ago

@nkbt Any update on this? If there's a need for help with maintaining this, I'm sure there's competent people here willing to help...

nkbt commented 3 years ago

I am still getting notifications and emails, btw =) It is not just the matter of approving PR and pushing new release unfortunately (oh I wish it would be)

Here is some context. It is hard for me to test react-motion in real-world product as I no longer work with any projects using react-motion. So the only way for me now would be to use demo examples only (I remember having a few edge cases beyond those). Also I never really used or worked with anything except main Motion component (plus core), so have basically no idea about things like staggered motion, etc. There was partially completed refactoring which we did not get finished as contributor vanished and I did not have any spare time to finalise all the work myself, thus releasing new version to the public was blocked (still is, as it turns out). Should have reverted all back in hindsight... @RaddishIoW There were few cases people jumping on and helping out with the library one or a few times and then leaving, so not like there was anyone specific committed to do full on support work on it. Generally it's quite hard to squeeze opensource in between all the life things like family, baby, travelling, work, personal projects, unless it is used in your work projects and you have ability to contribute as part of your day job (which is not the case for me anymore for quite a while now). I'll see if I can do anything, but cannot promise much at this point. I want to make sure it is in shape to safely do patch releases without breaking changes (check past PRs and revert unfinished work from master). Then it would be in a maintenance mode (just keep updating critical deps, etc).

atom258 commented 3 years ago

2021

JohnRoseDev commented 2 years ago

How can an amazing project with 20k stars, conf presence (react europe talk), and a fantastic api be abandoned like this by the owner(s)? Completely understand if they don't have time anymore for the project, no blame in that, but couldn't one try in that case to delegate some ownership so someone can simply publish a new version of this package since the necessary code change is already there?

catamphetamine commented 2 years ago

2022

GPrimola commented 1 year ago

2023

datplt commented 8 months ago

2024

theformer commented 8 months ago

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。