title: Is there a way to access global state in createSlice?
body: <p>Here is an example:</p>
  
  <pre><code>const user = createSlice({
    name: 'user',
    initialState: { name: '', age: 20 },
    reducers: {
      setUserName: (state, action) =&gt; {
        state.name = action.payload // mutate the state all you want with immer
      }
    },
    // "map object API"
    extraReducers: {
      [counter.actions.increment]: (state, action) =&gt; {
        state.age += 1
      }
    }
  })
  </code></pre>
  
  <p>Can I get access to the counter state?
  Let's say I want to increment age only when the counter is 30. Otherwise, I would need to listen when the count is changing in <code>useEffect</code> hook and dispatch some action that will handle age increment (?).</p>
  
  <p>In other words, what's the best way to compute the slice of state based on the current global state using <code>redux-toolkit</code>?</p>