title: How can I add a click handler to BODY from within a React component?
body: <p>I am building a pulldown menu React component that should close when the user clicks anywhere in the DOM <strong>outside</strong> of the component.</p>
  
  <p>Using jQuery I would typically add an event listener to the <code>body</code> when the pulldown is opened, and remove it again when the pulldown is closed. (The event listener itself closes the pulldown – any click events <strong>within</strong> the component are not propagated to prevent the body click handler from firing.)</p>
  
  <p>Is there any way to attach a listener to the <code>body</code> element from within a React component? Or should I just use jQuery? (I'm a bit wary of mixing React and jQuery.)</p>