title: State mutation in Redux
body: <p>I know that Reducers are just pure functions that take the previous state and an action, and return a new state objects, instead of mutating the previous state.<br>
  But although direct mutations are not Redux's philosophy, it's still possible (or i missed something) :  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const reducer = (oldState = initialState, action) =&gt; {
    switch (action.type) {
      case "ACT": {
       // mutate state directly instead of create a new one
        oldState.subobj.ssub.key = "hi hi";
        return oldState;
      } default: { 
        return oldState;
      }
    }
  };</code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="https://jsfiddle.net/asicfr/gt365nka/" rel="nofollow noreferrer">Full code here</a></p>
  
  <p>Why does not redux perform verification to prevent this kind of action ?<br>
  How can we ensure that developers will never do that ?  </p>