Please enable JavaScript.
Coggle requires JavaScript to display documents.
Redux - Coggle Diagram
Redux
solves
predictability
no-race condition
reproducability
testability
diagnosing
time-travel debugging
durability
description
unidirectional data flow
deterministic (same state, same view, same output)
single source of truth
state management
immutable data
encourage data normalization
core
store
holding application state
state hydration/ persistent state
methods
dispatch()
subscribe()
getState()
actions
actioncreator
action {}
reducers
preferably serializable data structures
state slice / partition
combinerReducer / root reducer - reducer composition
purity
no side effectts
no mutation
no API calls
middleware
selector pattern
utilities & statemanagers
immer.js
immutable js
MobX
Flux
packages
redux-thunk
react-redux
provider
provide store to all child components
connect
mapStateToProps
mapDispatchToProps