title: How to maintain state after a page refresh in React.js?
body: <p>Lets say I have code that sets state for a select box chosen on the previous page:</p>
  
  <pre><code>this.setState({selectedOption: 5});
  </code></pre>
  
  <p>Is there any way to have <code>this.state.selectedOption</code> populated with 5 after a page refresh?</p>
  
  <p>Are there callbacks that I can use to save this in localStorage and then do one large <code>setState</code> or is there a standard way of doing something like this?</p>