title: Where to put callback function in react-transition-group
body: <p>I want to run a process only after transition has ended.</p>
  
  <p>Here the docs say:</p>
  
  <blockquote>
    <p><strong>addEndListener</strong></p>
    
    <p>Add a custom transition end trigger. Called with the transitioning DOM
    node and a done callback. Allows for more fine grained transition end
    logic. Note: Timeouts are still used as a fallback if provided.</p>
  
  <pre><code>addEndListener={(node, done) =&gt; {
    // use the css transitionend event to mark the finish of a transition
    node.addEventListener('transitionend', done, false);
  }}
  </code></pre>
  </blockquote>
  
  <p>So I use it like this:</p>
  
  <pre><code>&lt;Transition
    addEndListener={(node, done) =&gt; {node.addEventListener('transitionend', done, false);}}&gt;
    &lt;MyComponent /&gt;
  &lt;/Transition&gt;
  </code></pre>
  
  <p>The problem is I don't understand where to put my function to be executed after the transition ended.</p>
  
  <p>If this is my function:</p>
  
  <pre><code>function abc() {
    // blah
    // blah
    //blah
  }
  </code></pre>
  
  <p>Where can I put it? Should I put it in the place of <code>done</code>?</p>