File tree Expand file tree Collapse file tree 2 files changed +18
-16
lines changed Expand file tree Collapse file tree 2 files changed +18
-16
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react'
2
- import { CSSTransitionGroup } from 'react-transition-group'
2
+ import { CSSTransition , TransitionGroup } from 'react-transition-group'
3
3
import {
4
4
BrowserRouter as Router ,
5
5
Route ,
@@ -35,24 +35,26 @@ const AnimationExample = () => (
35
35
</ ul >
36
36
37
37
< div style = { styles . content } >
38
- < CSSTransitionGroup
39
- transitionName = "fade"
40
- transitionEnterTimeout = { 300 }
41
- transitionLeaveTimeout = { 300 }
42
- >
43
- { /* no different than other usage of
38
+ < TransitionGroup >
39
+ < CSSTransition
40
+ classNames = "fade"
41
+ timeout = { 300 }
42
+ key = { location . key }
43
+ >
44
+ { /* no different than other usage of
44
45
CSSTransitionGroup, just make
45
46
sure to pass `location` to `Route`
46
47
so it can match the old location
47
48
as it animates out
48
- */ }
49
- < Route
50
- location = { location }
51
- key = { location . key }
52
- path = "/:h/:s/:l"
53
- component = { HSL }
54
- />
55
- </ CSSTransitionGroup >
49
+ */ }
50
+ < Route
51
+ location = { location }
52
+ key = { location . key }
53
+ path = "/:h/:s/:l"
54
+ component = { HSL }
55
+ />
56
+ </ CSSTransition >
57
+ </ TransitionGroup >
56
58
</ div >
57
59
</ div >
58
60
) } />
Original file line number Diff line number Diff line change 47
47
"cheerio" : " ^0.22.0" ,
48
48
"react-icons" : " ^2.2.3" ,
49
49
"react-media" : " ^1.5.1" ,
50
- "react-transition-group" : " ^1.1.2 " ,
50
+ "react-transition-group" : " ^2.2.1 " ,
51
51
"resolve-pathname" : " ^2.0.2" ,
52
52
"slug" : " ^0.9.1"
53
53
}
You can’t perform that action at this time.
0 commit comments