@messman/react-common-transition
v7.1.0
Published
React tools for managing animations
Downloads
2
Readme
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
skipTransitioning
boolean property to theSwitchTransition
component to skip transitions. - Updated the
transitionKey
property ofSwitchTransition
to allow boolean values,null
, andundefined
.undefined
acts as "use last key" and skips transitions.null
also skips transitions, but only the transitions related to renders from whennull
was the key.true
andfalse
are translated to unique string keys.
v7.0.0
- Updated dependencies
- Added the
SwitchTransition
component for transitioning out old content without explicitly holding it in state - Added helper function
createTransitionCallback
and 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
enter
andexit
; useenter-start
andexit-start
for before the reflow, or useactive
andinactive
.
- Removed
v6.1.0
- Update dependencies
- Update to React 18
v6.0.0
- Removed the need for a
ref
to be created outside and passed to the component and its child. That's now handled internally with the magic ofcloneElement
. - Renamed
isNotEntering
toskipEntering
andisNotExiting
toskipExiting
. - 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
classPrefix
to 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
CSSTransition
andTransition
in a new hooks-basedTransition
component that has fewer input props and requires aref
to 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