title: how to store redux state
body: <p>I am beginner using Redux,I want to store redux's state in my app , because whenever I refresh the page redux will reset the state .
  this is my the userSlice.js:</p>
  <pre><code>import { createSlice } from '@reduxjs/toolkit'
  const initialState = {
      userName: null,
      userEmail: null
  }
  
  const userSlice = createSlice({
      name: 'user',
      initialState,
      reducers: {
          setActiveUser: (state, action) =&gt; {
              state.userName = action.payload.userName
              state.userEmail = action.payload.userEmail
  
          },
          setUserLogOutState: state =&gt; {
              state.userName = null
              state.userEmail = null
  
          }
      }
  });
  
  export const { setActiveUser, setUserLogOutState } = userSlice.actions
  export const selectUserName = state =&gt; state.user.userName
  export const selectUserEmail = state =&gt; state.user.userEmail
  
  export default userSlice.reducer
  </code></pre>
  <p>store.js</p>
  <pre><code>import { configureStore } from '@reduxjs/toolkit'
  import userReducer from './userSlice'
  export default configureStore({
      reducer: {
          user: userReducer
      }
  })
  </code></pre>
  <pre><code>
  ReactDOM.render(
    &lt;React.StrictMode&gt;
      &lt;Provider store={store}&gt;
        &lt;App /&gt;
      &lt;/Provider&gt;
    &lt;/React.StrictMode&gt;,
    document.getElementById('root')
  </code></pre>
  <p>Signup.js</p>
  <pre><code> const dispatch = useDispatch()
      const userName = useSelector(selectUserName)
      const userEmail = useSelector(selectUserEmail)
      const onClickButton = (e) =&gt; {
          e.preventDefault();
          signInWithGoogle().then((result) =&gt; {
              dispatch(setActiveUser({
                  name: result.user.displayName,
                  email: result.user.email
              }))
          })
  
      }
  </code></pre>
  <p>So how exactly can i store the state of the user    whenever i refresh the page ?</p>