February 2019
Beginner to intermediate
180 pages
4h 4m
English
Now, in App.re, we can change the render function to use these components. We'll change this:
<main> {currentRoute.component} </main>
Now it appears as follows:
<main> ReactTransitionGroup.( <TransitionGroup> <CSSTransition key={currentRoute.title} _in=true timeout=900 classNames="routeTransition"> {currentRoute.component} </CSSTransition> </TransitionGroup> )</main>
For completeness, here is the corresponding CSS, which can be found in ReactTransitionGroup.scss:
@keyframes enter { from { opacity: 0; transform: translateY(50px); }}@keyframes ...Read now
Unlock full access