score:5

<TransitionGroup>
  <CSSTransition
    key={location.pathname}
    classNames="anim"
    timeout={{ enter: 700, exit: 700 }}
    onExit={node => {
      node.style.position = "fixed";
      node.style.top = -1 * window.scrollY + "px";
    }}
  >
    <TransitionHandler location={location}>
      <div>{children()}</div>
    </TransitionHandler>
  </CSSTransition>
</TransitionGroup>

Related Query

More Query from same tag