Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React - Is there is a difference between TransitionGroup / ReactCSSTransitionGroup / CSSTransitionGroup

So I cannot figure out why people like to call the React Transition Functions in the different ways by

TransitionGroup: import TransitionGroup from 'react-transition-group/TransitionGroup'

ReactCSSTransitionGroup import ReactCSSTransitionGroup from 'react-transition-group'

CSSTransitionGroup import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'

So, the question is there some differenses (performance, functionality) between these invokes or it just on the mind of the developer - how to call the Transition from react-transition-group...

P.S. I do not find the answer on this question in the web.

I'll be pleased for any help...

like image 735
Sviat Kuzhelev Avatar asked Jul 02 '26 01:07

Sviat Kuzhelev


1 Answers

Based on the index.js the following are the same:

import { TransitionGroup } from 'react-transition-group'
import TransitionGroup from 'react-transition-group/TransitionGroup'

The since CSSTransition exports a default class the following is misleading:

import TransitionGroup from 'react-transition-group/CSSTransition'
import AnyThing from 'react-transition-group/CSSTransition'
like image 176
Ryan Schumacher Avatar answered Jul 03 '26 15:07

Ryan Schumacher



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!