dimanche 6 octobre 2019

Is dom updation more expensive or rendering whole page(dom) again is more expensive?

I have a div with 10 elements. I want to add one more div in vanilla js. Should I add using DOM api's(appendChild) ?(but they are expensive) or should I create a javascript object inserting that element's data and render my whole list again using a loop?




Aucun commentaire:

Enregistrer un commentaire