title: React redux - store isn't loaded but no errors
body: <p>I am following the <a href="https://github.com/MoonHighway/learning-react/tree/master/chapter-11/color-organizer" rel="nofollow noreferrer">code example</a> from Learning React book. It is about react redux and react router used for single page app.</p>
  
  <p>Here is the <a href="https://github.com/andrii-p/car-saver" rel="nofollow noreferrer">link</a> to my project where I mimic the example above. You can clone it and run with <code>npm install</code> and <code>npm run dev</code>. (Note: project also has back end code but it is irrelevant. Question is only about front end part where I use static data file.)</p>
  
  <p>I can successfully run the example locally, but when I run my project I see my store being empty when it comes to load ui components. I don't get any compile or console errors, and I see other parts of the app working fine. I spent lots of time debugging store creation code but I can't figure out why it doesn't work. Please help to find the reason.</p>
  
  <p>Here are my findings:</p>
  
  <p>There are two url available in my project: <code>/</code> and <code>/cars</code>. The <code>/cars</code> url reads data file directly and it does output all the data correctly. </p>
  
  <p>The root url suppose to do the same by utilizing redux store. However the data array used by ui component comes empty. I guess there is something wrong with the code for store creation (below), although I precisely mimicked the code example. There is literally only one change that I made which is <code>carsReducer</code>, and I coded it exactly as other reducers in the example.</p>
  
  <p>I also noticed that <code>localStorage</code> isn't being populated in the console, but it doesn't give much clue.</p>
  
  <pre><code>src/main/resources/static/js/store/index.js
  
  const storeFactory = (initialState=stateData) =&gt;
      applyMiddleware(logger, saver)(createStore)(
          combineReducers({carsReducer}),
          (localStorage['redux-store']) ?
              JSON.parse(localStorage['redux-store']) :
              initialState
      )
  </code></pre>