You’ll find your components much easier to reuse and reason about if you divide them into two categories. I call them Container and Presentational components.
I assume you have knowledge about redux architecture
Container Components
- Aware of redux
- Subscribe redux state
- Dispatch to redux actions
- Generated by react-redux
- Focus on how things work
Presentational Componets
- Unaware of redux
- Read data from props
- Invoke callbacks on props
- Written by developer
- Focus on how thing look
Benefits of categorizing components
- Reusability
- Separation of concerns
For more details read this article
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…