Idiomatic Redux: Implementation and Intent
I&#x27;ve just started another side project using React with redux. One of my goals is to keep my code as simple as possible while still being able to build a large application.<p>To keep it simple, I&#x27;m not using react-redux (I often try to avoid this), and I generally pass the entire store down through all child components, again to keep it simple. My top level app with its simple navigation code subscribes to the redux store and sets its state from it. My router is just a bunch of statements like {pageName === &#x27;connnections&#x27; &amp;&amp; &lt;ConnectionsPage {...props}}.<p>To avoid too much boilerplate, I find most of the time all you need are some helper functions. I have a helper function called &#x27;action&#x27; that I call like action(&#x27;LOAD_SOME_DATA&#x27;) that dispatches on the store with type: &#x27;LOAD_SOME_DATA&#x27;. I use a simple &#x27;getIn&#x27; function to access nested data, and I mutate data in my reducers with object-path-immutable. Everything is clean and easy to read.<p>I believe one of the biggest problems with the React community is the constant bleed of &#x27;performance&#x27; into app design and development. Premature optimization is everywhere.<p>Guess what, most apps won&#x27;t need immutable data and free componentShouldUpdate checks, memoized selectors, or subscribing to subsections of the store using complicated &#x27;connect&#x27;&#x2F;high order component plumbing.<p>The one time I actually had a perf issue with React was when I had a GIGANTIC list of data (showing all the active salespeople in our company -- we have a lot), which due to me storing form state in redux was being completely re-rendered every keystroke.<p>The solution wasn&#x27;t to add react-redux or start using immutable data - it was to add paging and filtering. I improved performance, but more importantly, the UX of the app with this.<p>If your React app really is so huge and complex that it needs reselect, react-redux, react-router, great stuff -- you are obviously building software for a successful product with lots of feature requirements. Most apps I&#x27;ve worked on never got to this level of complexity.