title: If render functions should be pure, how the view can get changed based on state?
body: <p>I am new to react and while going through the tutorials I found this ,</p>
  
  <ul>
  <li>"The render() function should be pure, meaning that it does not modify component state, it returns the same result each time it's invoked, and it does not directly interact with the browser." - <a href="https://facebook.github.io/react/docs/react-component.html#reference" rel="nofollow noreferrer">https://facebook.github.io/react/docs/react-component.html#reference</a></li>
  </ul>
  
  <p>I am little confused with this. If render function should return same result each time how can I modify the display based on states ?</p>
  
  <p>For example I have text with edit button. When I click on edit,  text-box should appear with content of text and edit button changes to save.</p>