title: React Security on state management
body: <p>Let's say that I have this code:</p>
  
  <pre><code>const UserProfile: React.FC&lt;RouteComponentProps&gt; = (props) =&gt; {
  
      const { isAdmin} = useContext(GlobalContext);
  
      if (isAdmin()) {
        return &lt;CriticalFeature/&gt;;
      } else {
      return &lt;NonCriticalFeature/&gt;;
      }
  
  }
  
  export default UserProfile;
  </code></pre>
  
  <p>The problem with this code is that someone can open the react web page and take a look at that state and change it (with the default  react tools for example). Then the user is going to act as an admin (i know... not on the server side due the authentication, but still is going to see at least some code from admin page).</p>
  
  <p>how do you handle this situation?</p>