title: Can you, or should you use localStorage in Redux's initial state?
body: <p>For example... </p>
  
  <pre><code>export const user = (state = {
    id: localStorage.getItem('id'),
    name: localStorage.getItem('name'),
    loggedInAt: null
  }, action) =&gt; {
      case types.LOGIN:
        localStorage.setItem('name', action.payload.user.name);
        localStorage.setItem('id', action.payload.user.id);
        return { ...state, ...action.payload.user }
  
      default:
        return {  ...state, loggedInAt: Date.now() }
  }
  </code></pre>
  
  <p>That's a scaled down version of what I'm doing, default returns the state from localStorage as expected. However the state of my application is actually blank once I refresh the page. </p>