React Router CSSTransition

59 Views Asked by At

It is kind of hard to understand the CSSTransition.

<Container className="relative">
    <TransitionGroup className="transition-group">
        <CSSTransition key={currentKey} timeout={timeout} classNames="fade" appear>
            <Switch location={location}>
                {this.props.children}
            </Switch>
        </CSSTransition>
    </TransitionGroup>
</Container>

I still do not understand about:

  1. What does key in <CSSTransition /> do? How is this affecting the changes?
  2. What does the location inside '` do?
0

There are 0 best solutions below