Please enable JavaScript.
Coggle requires JavaScript to display documents.
Modern JS web app (Redux (store (state, can be more than one used in an…
Modern JS web app
Redux
store
-
-
manages state changes using a reducer #
-
reducer
-
should return state object having the same attributes (name and data type) as the state object passed to it in function call argument
-
-
middlewares
redux-thunk
thunk
a function that gets store.dispatch from redux-thunk and can use it to dispatch multiple synchronous actions (usually with delay)
usually uses some kind of async function to perform complex operations and dispatch sync actions in every crucial moment (begin, success, fail) #
-
passes store.dispatch to each incoming thunk action to expand it to multiple synchronous actions - simple objects with type attribute
redux-localstorage
persists partial state to localStorage #
-
-
-
-
-
-
-
React
third party components
-
react-redux
-
Provider
-
provides the store to nested connected components #
-
-
-
-