Hacker News new | past | comments | ask | show | jobs | submit login

This article is almost four years old but I still refer to it all the time: https://medium.com/@dan_abramov/smart-and-dumb-components-7c...

What I tell my students is that you want to think of your app in three layers -- the data layer (Redux/data fetching), the glue layer (@connected components, useEffect hooks), and the presentational layer. The representational layer should be just your rendering logic and the data layer should deal with fetching/storing/updating data. The two should never interface directly, only through your container "glue" components.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: