Skip to content

Commit ac90a62

Browse files
committed
redux flow from user clicks to changes in state
1 parent 6eb4116 commit ac90a62

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

Redux/README.md

+1-13
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
This means that all data in an application follows the same lifecycle pattern, making the logic of your app more predictable and easier to understand. It also encourages data normalization, so that you don't end up with multiple, independent copies of the same data that are unaware of one another.
1616

17-
### The user clicks a button in the app and a component prop is called like a function.
17+
### The user clicks a button in the app and a component prop is called like a function. The function is called in the form of component.
1818

1919
### The corresponding container dispatches an action. This happens because the prop (which was just called in the container) is tied to an action dispatcher using mapDispatchToProps (in the container).
2020

@@ -46,18 +46,6 @@ Object goes to the reducer, which in turn is just a function that takes an objec
4646

4747
### 6> That store then is fed-back into React and calls forth the final updated state.
4848

49-
Again I’ll walk through a simple example to show how a user input could trigger a state change that is reflected by a different part of the screen.
50-
51-
The user clicks a button in the app and a component prop is called like a function.
52-
53-
The corresponding container dispatches an action. This happens because the prop (which was just called in the container) is tied to an action dispatcher using mapDispatchToProps (in the container).
54-
55-
A reducer ‘hears’ that action and runs a function which returns a new state with specific modifications.
56-
57-
The container ‘knows’ that state has changed and modifies a specific prop in the component as a result of the mapStateToProps function.
58-
59-
The component now has a prop that has officially changed due to a new state being generated, so if that prop is responsible for any any visible UI, the user will see it change automatically.
60-
6149
#### Further Reading
6250

6351
[https://medium.com/@holtkam2/react-redux-understanding-the-data-flow-fd700b6bd56f](https://medium.com/@holtkam2/react-redux-understanding-the-data-flow-fd700b6bd56f)

0 commit comments

Comments
 (0)