At first Redux looks very complex even when its API is very small. There are a few simple rules that you have to know to use Redux successfully:
store
.reducer
function can update state changes in a Redux store
reducer
function is triggered by an action
.Actions
is dispatched (called) from within your application.action
is a service request to a service supplier (reducer
) with a request for change (what kind of change + explanatory data)reducer
) sends the request action
based on the kind of request
to the service department (function)explanatory data
(data) and makes a copy of the current situation and scribbles the modifications to it.action
passes by.