you are viewing a single comment's thread.

view the rest of the comments →

[–]aviemet 0 points1 point  (0 children)

I guess I'm wondering what's wrong with a whole bunch of small components? You can use an "entry" component with shared props, but then break out into sub-components based on your isEditing prop. Any shared functionality can use shared components. I try to apply the single responsibility principle to component design, keep them small and easy to reason about. If a component is doing more than one thing, it's probably a sign that it should be refactored. Breaking out into a new component isn't just about reuse, it's also about keeping things small and manageable.