DEV Community

Discussion on: React's default way of appending itself to a DOM tree considered harmful

Collapse
 
trumbitta profile image
William Ghelfi • Edited

Loss of performance is certainly a factor in a JS application where you need to get dozens of elements or more. If that's the case, you should measure then optimize if needed. And an easy optimization is to use ids and getElementById().

The initialization code for a React app is just one querySelector() at the start, tho, and with a simple selector. I don't expect the difference in performance to be perceived by users of the app :)