yarn react-flip-move 1.0.5
v1.0.5

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

Implement higher-order component for prop preparation.

Refactored FlipMove so that all prop-related logic (and there's a lot of it, with this module) lives in a higher-order component. This logic is crucial, but very uninteresting. By moving it out of the core component, the logic of the component becomes much cleaner and easy to reason about.

It also improves the performance of the module; because props are immutable within a component, the type conversion needed to happen several times, in different lifecycle components. React.Children.toArray was being called 3 times; now it's being called once.

Full list of changes:

  • duration, delay, staggerDurationBy, and staggerDelayBy can either be numbers or strings. The higher-order component converts them to integers, and warns if an invalid value was provided.
  • Converted single children to an array, so that they could be iterated over.
  • Moved propTypes and defaultProps to the new higher-order component.

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

NewReleases is sending notifications on new releases.