title: Using transitionend event listener with react to create a transition
body: <p>I'm trying to make a simple transition with react on a button click where the body max-height goes to 0 on componentWill update, then back to 500px or 100% on componentDidUpdate. I haven't been abe to quite understand it from the other questions I've seen so could someone show me an example with an explanation of how it works? </p>
  
  <p>I also wouldn't mind an example/explanation using reactcsstransitiongroup.</p>
  
  <p><strong>More Info</strong></p>
  
  <p>I understand that transitionend attaches an event listener but what I'm getting confused with is how to use that to ensure the component doesn't update until the transition is finished (I've taught myself react and pretty much all my coding knowledge so I don't know if this is suppossed to be hard to understand, but its hard for me at the moment). Thanks all!</p>