DEV Community

Discussion on: React long Components

Collapse
oziniak profile image
Oleh Ziniak

I believe in huge open-source projects lots of lines just cover some Github issues and edge cases that you would rarely need to cover in your app. But most definitely there are going to be some edge cases you would definitely need. And you'll find them in a hard way. So the thing is you will never know for sure what exactly you need in advance.

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 :).