--

That is a good question!

I think you have to find the correct balance between DOM element and components.

E.g. if I have table with a heading above I also don't put the heading into a separate component.

<h1> Header </h1>

<MyTableComponent />

I think you have to find the correct trade of for yourself. But if you see a component where there is a lot of mixture of abstraction then it makes sense to extract some code into components.

--

--

Lorenz Hofmann-Wellenhof
Lorenz Hofmann-Wellenhof

Written by Lorenz Hofmann-Wellenhof

👨‍💻 Software Eng @ AI unicorn 🇺🇸 Sharing my lessons for non-stop growth in AI, coding, & life optimizations. I build things & put them on the Internet.

No responses yet