Skip to content

v2.10.0

Compare
Choose a tag to compare
@joshwcomeau joshwcomeau released this 26 Nov 15:10
· 38 commits to master since this release
784604d

Wrapperless Mode

Prior to React 16, a React component had to return a single top-level element. This meant that React Flip Move had to wrap its children in a <div> or other HTML node; it couldn't just return the array of children provided to it.

Happily, React's new reconciliation engine in v16 changes this, and React Flip Move can now be run in "wrapperless" mode, which means that it won't create an additional node.

To use this new mode, simply set typeName to null.

There may be some quirks. For example, React Flip Move still needs to position its children to handle leave animations, and so if <FlipMove>'s parent container is set to position: static (the default), you may notice some quirky behaviour. To fix this, just set position: relative (or absolute/fixed) on the parent.

Huge thanks to @tobilen for their work on this feature, and to @Hypnosphi for reviewing.