title: Redux app structure when having multiple users
body: <p>i'm trying to learn redux and i'm not sure what is best way to structure my app state when the app is used by multiple users.</p>
  
  <p>App flow:</p>
  
  <p>on every login <code>{userid,username,token}</code> is stored in <code>localStorage.appUsers</code></p>
  
  <p>now if my app initialState looks like following</p>
  
  <pre><code>{
   appusers:[],//Array of app users, i only keep the token and id and username and i fetch the full user info from server when user is selected as current logged in.
   currentUser:{id,fullname,picture,...etc} //current user
   blog:[],//array of blog posts of current logged in user
   chat:[],//array of chat messages of current logged in user
  }
  </code></pre>
  
  <p>i use localstorage also to save the user state so that next time he open app, it present initialState from localstorage until it refresh the cache from server.</p>
  
  <p>problem is that currently the blog and chat keeps array of posts for the current logged in user, when user switch users he is presented with someone else data.</p>
  
  <p>so what is the correct approach to maintain separate store for every user ?
  i tried to modify my initial state so that the blog and chat arrays become a property of appUsers, then i faced problem with react <strong>combineReducers</strong> which expects a key for every reducer in the initialState.</p>