title: Sending Analytics events from react component
body: <p>What is the right way to send analytics events from React components? Currently, if I send it from a component render method the events get sent multiple times because the component re-renders multiple times because of setState call.  And If I try to set a state flag after sending a analytics event to avoid multiple event sending the warning for setState </p>
  
  <blockquote>
    <p>"Cannot update during an existing state transition"</p>
  </blockquote>