September 2018
Intermediate to advanced
302 pages
7h 17m
English
When you dive into the React ecosystem for the first time, you may get a bit of a surprise. There are a lot of examples that use pure functions and talk about time travelling, using Redux, and about one store to rule them all.
The truth is, neither React nor Redux use only pure functions. In fact, there are a lot of functions in both libraries that perform mutations in the outer scope:
// Redux library code// redux/src/createStore.jslet currentReducer = reducerlet currentState = preloadedStatelet currentListeners = []let nextListeners = currentListenerslet isDispatching = false// Check yourself:https://github.com/reduxjs/redux/blob/1448a7c565801029b67a84848582c6e61822f572/src/createStore.js
These ...
Read now
Unlock full access