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

FlipMove doesn't work with styled-components v4 #237

Closed morleyzhi closed 6 years ago

morleyzhi commented 6 years ago

[style-components](https://github.com/styled-components/styled-components) just released v4 which moved to the forwardRef API.

React Flip Move supported styled-components v3 children, but with v4, we get this error:

Error: Uncaught [TypeError: Cannot read property 'isReactComponent' of undefined]

To reproduce, clone this repo, install, and run yarn test:

https://github.com/morleyzhi/styled-flip

This will show the following:

More information is here: https://github.com/styled-components/styled-components/issues/2124

morleyzhi commented 6 years ago

Going to open a PR with an attempted fix.

morleyzhi commented 6 years ago

See https://github.com/joshwcomeau/react-flip-move/pull/238

joshwcomeau commented 6 years ago

Thanks @morleyzhi! Shipped in 3.0.3