1# npm
2npm install react-transition-group --save
3
4# yarn
5yarn add react-transition-group
1function App() {
2 const [inProp, setInProp] = useState(false);
3 return (
4 <div>
5 <CSSTransition in={inProp} timeout={200} classNames="my-node">
6 <div>
7 {"I'll receive my-node-* classes"}
8 </div>
9 </CSSTransition>
10 <button type="button" onClick={() => setInProp(true)}>
11 Click to Enter
12 </button>
13 </div>
14 );
15}