I'm looking for perspectives from other web/ui developers.
I'm a UI developer and my company requires that I use components built by another team within the company.
That team has developed some patterns over time that I would consider bad practice, but I thought I'd see what others think before I raise any awareness to the other team.
So, for example, this other team has created a drawer that slides into view when a button is pressed, and goes back out of view when it is closed. The problem I have with this is that the entire component is in the dom, but only set to hidden. So I can't see it visibly, but it is still there, all the time.
Another component they have built is a datepicker, which when you click on the input field, it opens up the calendar with the current month displayed. When you select a day or press the close button in goes out of view. This issue with this is that when it is closed, it again is only hidden. So if you look in the dom, you'll see the elements for the calendar container, the title bar with the day names, all of the days in that month, and nested inside of each day is the span.
These are only 2 examples of components they have made, but they follow this practice of only hiding elements with almost all of their components.
My worry with this is that when an entire page is finished, the dom is full of unnecessary elements and could potentially bog down the performance of the app. I currently write in React and try my hardest not to render anything unless it needs to be seen. But with the other team's components it is usually not possible.
Would anyone else consider this bad practice? Or have any suggestion that I could bring to attention?
Ps. There is no code because I'd be violating my security agreement
Infinitytimes more concerned with delivering features and keeping my code maintainable.