How can I remove elements from the DOM level when they are hidden/ collapsed?
On some bubble apps the element count on the DOM level removes items that are collapsed and hidden. So on single page apps, when users navigate away from elements, they are removed from the DOM level.
Here’s an app that does it:
This is great for UX especially on mobile. It’s quick.
My app doesn’t do that. As users quick around the DOM count continues to grow, even when major groups in my single page app are hidden and collapsed. This could cause mobile browsers to crash since they can run out of memory around 15k elements on the DOM level
here’s mine as i click around:
You can see the DOM coiunt quickly gets to over 19,000 elements on the DOM level. I can click around more and I’ll get to 50k elements.