title: How to handle global DOM events in ReasonML/ReasonReact?
body: <p>What's the most idiomatic way of listening/handling global DOM events in ReasonML.</p>
  
  <p>I'm building a ReasonReact version of the 2048 game where I need to listen for keyboard events.</p>
  
  <p>In a standard JS/React app I'd have a component with a <code>componentDidMount</code> lifecycle method where I would listen to the event with <code>document.addEventListener("keypress", [my_event_handler])</code> and unlisten to the same on <code>componentWillUnmount</code> with <code>document.removeEventListener("keypress", [my_event_handler])</code>.</p>
  
  <p>What's the most idiomatic way of accessing document.(addEventListener/removeEventListener) in Reason/ReasonReact?</p>