joshwcomeau / react-flip-move

Effortless animation between DOM changes (eg. list reordering) using the FLIP technique.
http://joshwcomeau.github.io/react-flip-move/examples
MIT License
4.09k stars 258 forks source link

React 18: Console Errors when using Flip Move "Using UNSAFE_componentWillReceiveProps" "findDOMNode is deprecated in StrictMode" #270

Open douglasg14b opened 2 years ago

douglasg14b commented 2 years ago

This seems like things have been deprecated that flipmove is using?

I'm using React 18

image

react_devtools_backend.js:3973 Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/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://reactjs.org/link/derived-state

Please update the following components: FlipMove

And

Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of FlipMove which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here:

peterwiebe commented 2 years ago

Have you tried fixing the issue? @douglasg14b

douglasg14b commented 2 years ago

Can you expand on that?

peterwiebe commented 2 years ago

@douglasg14b you can ignore my question. I have switched to https://github.com/aholachek/react-flip-toolkit instead since this library is no longer maintained.