2018-07-02

To sum up the power control issue.


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.



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.



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.

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容