title: How to getState() in Redux Toolkit
body: <p>I have the following slice and function. How can I get values stored in my initialState?</p>
  <pre><code>const example = createSlice({
    name: &quot;example&quot;,
    initialState: {
     firstName: hello,
     lastName: world
    },
    reducers: {}
   })
  
  export const create = (id) =&gt; {
    return async (dispatch) =&gt; {
        const currentState = getState()
        console.log(currentState) 
    };
  };
  </code></pre>
  <p>Do I have to use useSelector and pass values down to the function again? Ideally would like to get data directly from the already saved state</p>