title: Refresh Page upon React Component Update
body: <p>I have few React Components in my app which sends ajax calls. All works fine except one thing. I want to refresh the page when a particular component gets updated. So I used <code>location.reload()</code> in <code>componentWillReceiveProps</code> method. Though it works, unfortunately the whole page reloads whenever a component gets an update instead of just the component that has <code>location.reload()</code> code.</p>
  
  <p>Why this is happening and how can I prevent / solve this?</p>
  
  <p><em>Update and clarification:</em>  Thanks for the answers. I'm very much aware that state change re-renders the component. This is not a standalone React app and refreshing page is a requirement.</p>
  
  <p>This react app is part of WP settings page which is tabbed one. One tab of settings is a react app. Upon enabling a button, corresponding tab should be visible and that needs page refresh (as it is not react, but WP backend code). </p>
  
  <p>My question is If I add <code>location.reload()</code> in <code>componentWillReceiveProps</code> method of a single component, then why other components also refreshes page even though they don't have such code. Is <code>componentWillReceiveProps</code> a static method that is shared between all components? Why does other component state changes picks up <code>location.reload()</code> and refresh pages?</p>