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

>...turn ugly when you start breaking down components into smaller and smaller components.

Care to elaborate?

This seems opposite to how components ought to work.



Take a table that is broken into rows then cells, within the cell you have a media object within that you have a list with items.

Each of those become separate components. Can you reuse them, yes but it would be more helpful to keep them in one component.


Then don't split them. If you use powerful methodologies to keep track of complex state in one component, not splitting is generally easier too, although you will lose slightly on performance. No one forces you split a component into multiple ones. I've implemented entire games in just one component with logic cleanly described by a finite state machine.


Reading this makes me feel better I make large monolothic components. Most examples would have you believe doing so is a big no no.


You can keep them in one component. Nobody is making you split every single object into discrete components.


So keep them in one component.




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

Search: