joshwcomeau/react-flip-move

FlipMove doesn't work with styled-components v4

morleyzhi opened this issue · 3 comments

[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:

  • v3 works flawlessly with react-flip-move
  • v4 errors out

More information is here: styled-components/styled-components#2124

Going to open a PR with an attempted fix.

Thanks @morleyzhi! Shipped in 3.0.3