Show React Transition Group Elements with an Initial Transition with the `appear` Prop

Share this video with your friends

Send Tweet

In React Transition Group, it can be a common situation for a transition to appear when the component renders, rather than wait for any state to change based on, for example, a button click. Should we want the component to show on mounting, instead of waiting for any state to change, we can make use of the appear prop, which adds two targetable classnames; *-appear and *-appear-active.