Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Like spicyj said, the wrapper components pattern works really well. Some people have started referring to this as a separation between "smart" and "dumb" components. For instance, "smart" components do things like fetch data, then pass the data as props to "dumb" components. It's a cleaner separation of concerns than having a single component do everything via a mixin.

This is the pattern that the Flux library I wrote uses: https://github.com/acdlite/flummox/blob/master/docs/api/Flux...

I wrote also wrote a bit about why components are generally preferable to mixins: https://github.com/acdlite/flummox/blob/master/docs/why-flux...



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

Search: