title: Detect whether input element is focused within ReactJS
body: <p>How can I detect whether an input element such as the following is currently focused within a ReactJS render function?</p>
  
  <pre><code>&lt;input type="text" style={searchBoxStyle} placeholder="Search"&gt;&lt;/input&gt;   
  </code></pre>