title: How to handle focus using declarative/functional style libraries like Redux and ReactJS?
body: <p>In looking around to see what ways other developers are handling input focus when working with Redux I've come across some general guidance for <a href="https://stackoverflow.com/questions/28889826/react-set-focus-on-input-after-render">ReactJS components such as this</a>. My concern however is that the focus() function is imperative and I could see strange behaviours possible where multiple components are fighting over focus. Is there a <em>redux</em> way of dealing with focus? Is anybody dealing with pragmatically setting focus using <em>redux</em> and <em>react</em> and if so what techniques do you use?</p>
  
  <p>Related:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/31901397/how-to-set-focus-on-an-element-in-elm">How to set focus on an element in Elm?</a></li>
  <li><a href="https://stackoverflow.com/questions/32248943/automatically-focus-input-element-after-creation-in-purescript-halogen">Automatically focus input element after creation in purescript-halogen</a></li>
  <li><a href="https://github.com/cyclejs/cycle-core/issues/153" rel="nofollow noreferrer">https://github.com/cyclejs/cycle-core/issues/153</a></li>
  </ul>