chenglou / react-motion

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

rename react lifecycle methods to prefix "UNSAFE_" #575

Closed theopak closed 4 years ago

theopak commented 4 years ago

hi @chenglou and @nkbt! what do you think of potentially shipping this quick rename? it comes from $ npx react-codemod rename-unsafe-lifecycles and would make the developer experience a little better for consumers that are on react v16.9, like we are at @Frameio

for anyone just catching up with this situation — please note that this rename fixes the console warnings introduced in react@16.9 such that code will run in react@17, but this rename doesn't address the underlying issue

edit: i pushed a config change just to get the build to pass, so please lmk if there's a different way that would work better here

theopak commented 4 years ago

technically fixes #569

theopak commented 4 years ago

@nkbt awesome! i don't have merge permission though, can you merge this?

yes, the eslint change was just to get the build to pass

nkbt commented 4 years ago

I've tested this PR and also check if built version works ok in one of my projects and everything seems to work well without React warnings. Merging in.

nkbt commented 4 years ago

Cannot publish until https://github.com/chenglou/react-motion/issues/577

petrkrejcik commented 4 years ago

Hi @nkbt, will you make a release with this change?