DEV Community

Discussion on: React long Components

Collapse
 
sargalias profile image
Spyros Argalias

Yeah, I think this is the right answer.

If you were making your own component, it would be a few lines long to do what you needed.

If you are making a component that the entire world uses:

  • It must be general enough to be useful to a ton of use cases.
  • It must cover every edge case it could possibly encounter.
  • It must be performant, and sometimes making things performant makes code very complicated.
  • It must not have security vulnerabilities (although front end has it easier here than back end).
  • TypeScript
  • Accessibility.
  • And anything else you could think of.

It's normal to not understand anything that's going on at first when looking at projects like those :).