`setData` doesn't actually modify the DOM in any way, it's simply being used as a flag to mark the elements which are already in the DOM and which needs to be added/removed.