title: How to animate exit with react-transition-group
body: <p>I am using react-transition-group to create a modal that pops into view. </p>
  
  <pre><code>const AnimatedModal: SFC&lt;AnimatedModalProps&gt; = (props: AnimatedModalProps) =&gt; (
  &lt;CSSTransition in={props.showWindow} unmountOnExit key={1} classNames={'modal-fade'} timeout={300}&gt;
      &lt;BaseModal onCloseHandler={props.onCloseHandler} showWindow={props.showWindow}&gt;
          &lt;CSSTransition
              in={props.showWindow}
              key={2}
              unmountOnExit
              classNames={props.animationClassNames}
              timeout={300}
          &gt;
              &lt;ModalPanel onCloseHandler={props.onCloseHandler}&gt;{props.children}&lt;/ModalPanel&gt;
          &lt;/CSSTransition&gt;
      &lt;/BaseModal&gt;
  &lt;/CSSTransition&gt;
  </code></pre>
  
  <p>);</p>
  
  <p>However I am very confused on how to get this to animate out on exit. Since as soon as I sed props.showWindow = false. It destroys the whole component without giving it time to animate out. </p>
  
  <p>Is there some what to do this by nesting this in a TransitionGroup? </p>