7.1.0 • Published 3 years ago
@messman/react-common-transition v7.1.0
react-common-transition
Not recommended for use by anyone other than the creator. Feel free to fork.
npm install --save @messman/react-common-transition
Common transition tools for React. As noted below, this is a fork of react-transition-group.
History
v7.1.0
- Added the
skipTransitioningboolean property to theSwitchTransitioncomponent to skip transitions. - Updated the
transitionKeyproperty ofSwitchTransitionto allow boolean values,null, andundefined. -undefinedacts as "use last key" and skips transitions. -nullalso skips transitions, but only the transitions related to renders from whennullwas the key. -trueandfalseare translated to unique string keys.
v7.0.0
- Updated dependencies
- Added the
SwitchTransitioncomponent for transitioning out old content without explicitly holding it in state - Added helper function
createTransitionCallbackand related types for greater control over detecting the end of transitions - Added default support for tracking CSS Animations
- Breaking change: updated the class names applied during transition phases to improve clarity
- Removed
enterandexit; useenter-startandexit-startfor before the reflow, or useactiveandinactive.
v6.1.0
- Update dependencies
- Update to React 18
v6.0.0
- Removed the need for a
refto be created outside and passed to the component and its child. That's now handled internally with the magic ofcloneElement. - Renamed
isNotEnteringtoskipEnteringandisNotExitingtoskipExiting. - Added a property
isAlwaysMounted(false by default) to ensure the child is always mounted. - Added a helper function for getting the class selectors for use in
styled-components. - Added a default for
classPrefixto make it less likely that a prefix needs to be added in consuming projects.
react-transition-group
This project is a fork of React's react-transition-group from December 2021. This project retains the BSD 3-Clause License from that project.
This fork was created for the following reasons:
- Experiment with using React hooks instead of class components
- Make changes to the API for simplicity and to better support working with
styled-components - Retain the BSD 3-Clause License for modifications of the transition implementation
Changes made:
- Re-implemented the logic from
CSSTransitionandTransitionin a new hooks-basedTransitioncomponent that has fewer input props and requires arefto the transitioning child component - Removed all other components
- Removed former build and deploy code and added more familiar build and deploy code
This fork, while public, is generally not open for issues or feature requests.
Relevant documentation from that project:
A set of components for managing component states (including mounting and unmounting) over time, specifically designed with animation in mind. Main documentation