2018-07-02

To sum up the power control issue.

2018-07-02_第1张图片

Let’s say, we have 3 types of store: retail, restaurant and both.

The restaurant doesn’t want to show item image in order to save more space.
The retail would like to have the image show up.
If the store features both, we supposed it would like to have the image show up.
We checked the return values and find the 3 related keys.


2018-07-02_第2张图片


Checked the source code to find that it is using the redux-form 5.3.1.
Redux-form primarily consists of two things: a Redux reducer and a React component decorator.


2018-07-02_第3张图片

Line 212: The reducer listens to dispatched actions from the component to maintain your state in Redux.
Decorate your form component with reduxForm(). This will provide your component with props allowing you to attach your inputs to redux-form.

2018-07-02_第4张图片

你可能感兴趣的:(2018-07-02)