yarn react-flip-move 2.6.8
v2.6.8

latest releases: 3.0.5, 3.0.4, 3.0.3...
7 years ago

Add warning when supplying Stateless Functional Components

To work Flip Move's magic, it needs direct access to the component's backing instances (the rendered DOM nodes in the HTML).

For most elements (native DOM elements, or those created through React.Component or React.createClass), the underlying nodes can be accessed through a ref callback prop. Sadly, however, Stateless Functional Components don't support refs. Supposedly this is because there is no "public instance" of these components; they don't have any sort of place to attach the ref.

I added a note about this to the Gotchas section of the documentation, but it's very easy to miss.

When supplying an SFC, Flip Move had no checks or guards. It would just try and do it's thing, and it would blow up once it realized that it didn't have access to the DOM nodes. The error message was very unclear, though.

This release adds a simple warning in the console, to alert developers when they try and pass an SFC as a child to <FlipMove>.

Don't miss a new react-flip-move release

NewReleases is sending notifications on new releases.