Redux: combineReducers(..) is Way Simpler Than I Thought

The source for combineReducers(...) is really, really short. Take a look: https://github.com/reduxjs/redux/blob/master/src/combineReducers.js

What it does is also simpler than I thought. No complex composition of reducers working on different levels of an object tree, etc.

Reducers can ONLY be properties directly on the object you feed to combineReducers(...). And combineReducers(...) can ONLY feed them properties that are directly on the state object.

Hmmm... I understand more and more why my state object should be "normalized"

Comments

Popular posts from this blog

Callback, Promise, Observable, and Doughnuts

Learn grid and grid-template-areas FIRST!!!

The Day TDD Started Working for Me