title: How to access root state in a reducer in redux toolkit?
body: <p>I have a simple counter slice. In increment function I want to access root state. How can I do that?</p>
  <pre><code>const initialState = {
    value: 1
  }
  
  export const counterSlice = createSlice({
    name: &quot;counter&quot;,
    initialState,
    reducers: {
      increment: (state) =&gt; {
        state.value++
      }
    }
  })
  </code></pre>