DEV Community

Discussion on: 7 code smells in your React components

Collapse
 
lnaie profile image
Lucian Naie

your applicationForm example is meh. it makes me think you want to keep yourself busy, which I hope is not the goal here

Collapse
 
awnton profile image
Anton Gunnarsson

I'm not sure what you mean with "want to keep yourself busy", could you elaborate? :)

I'm inclined to agree that the example isn't the best though, might update that if I come up with something clearer. Composition however is a fantastic tool for reducing complexity, increasing testability etc!

Collapse
 
lnaie profile image
Lucian Naie

I meant to create more work and billing hours, also to keep it simple versus over-engineering it. I know, I know, it depends on the context.

Thread Thread
 
awnton profile image
Anton Gunnarsson

Ah, I see. Although I work as a consultant today I would do the same if I weren't getting paid for it :) Composition is great, even if you shouldn't go wild and try to compose everything ^^