title: Error: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft
body: <p>I have my reducer</p>
  <pre><code>
  const userAuthSlice = createSlice({
      name: "userAuth",
      initialState: {
          token: '',
      },
      reducers: {
          setToken: (state, action) => state.token = action.payload.test,
      },
  });
  
  </code></pre>
  <p>And I have my dispatch command</p>
  <pre><code>&lt;button
     value={text.sign_in.submit}
     onClick={() =&gt; dispatch(userAuthSlice.actions.setToken({test:&quot;test&quot;}))}
  
  /&gt;
  </code></pre>
  <p>As I press the button what I get is this error:</p>
  <p><img src="https://i.stack.imgur.com/qPDPR.png" alt="enter image description here" /></p>
  <p>I have isolated everything to be sure that this is the problem and nothing else.</p>
  <p>Why does this error pop up?</p>