title: reactJS - show form input when browser goes back
body: <p>I have form, after submitting user will be taken to another page. If they click browser go back button, they will go back to the form but input data is no longer there. </p>
  
  <p>What the proper way to recover input data in react?</p>
  
  <p>form:</p>
  
  <pre><code>export default class Update extends React.Component{
      constructor(){
          super();
          this.state = {
              items: {
                  firstName: '',
                  lastName: '',
              }
          };
      }
      updateContact(e){
          e.preventDefault();
          // saving data
          // then redirect 
          this.context.router.push('/');
      }
      render(){ 
          return(
              &lt;form id="new-form" onSubmit={this.updateContact.bind(this)}&gt;
                  &lt;input type="text" placeholder="First Name"  /&gt;
                  &lt;button type="submit" class="btn" &gt;Update&lt;/button&gt;
              &lt;/form&gt;
          )
      }
  }
  
  
  Update.contextTypes = {
      router: PropTypes.object.isRequired
  }
  </code></pre>