How do reusable elements work/load in terms of SPAs?

Hi Bubblers,

Quick question for you all…I’m trying to build a Dashboard SPA type of site. The way I have it setup is I have a dashboard ‘page’ and each ‘page’ within that dashboard, such as reports, profile, users, etc are setup as Reusable elements to be visible on url path that would be set by the nav. Currently, things are going smoothly and once my initial page load is loaded, things are very snappy.

However, I got two questions that I have a only a guess to the answer.

Does the data within the re-usable elements get requested/loaded BEFORE it’s set to ‘visible’?
From my guess of how my page has been loading, it doesn’t feel that way, which is good, because I don’t want all the invisible data to be loaded when it’s not necessary but I’d like a confirmation

Do invisible re-usable elements frontend elements actually get loaded and cause longer initial loading times? I’m aware that SPA’s that are built with Groups being visible and invisible cause more initial loading times, and I’m just not sure if it’s essentially the same exact thing that is going on with Reusable elements…Some reason it doesn’t ‘feel that way’


Would love to know more so I can confidently go down this path.

This is what I’ve found to be true:

Bubble loads “all” elements for hidden elements on a page.
Within those elements, bubble loads only some data. (If there’s a repeating group it may load the first 3 items, but no more even if there are only 5 items.)

You can find specifics for your app by looking at the network tab in your internet browser’s inspector. You can also load your page, and unplug your internet, and play around with it to see exactly what is loaded on page load when you click to view hidden elements.


I tried searching for the content within the reusable element of an invisible page through the inspector. It didn’t come up until I made it visible. I’m not that savvy with the inspector. But if this is true, than that’s great, because I think it’s a great balance of initial load times, on demand front end loading, and on demand data loading for a SPA type of feel.

Yeah just like element plugins, reusables don’t do anything until they are visible.

1 Like

And what about if they’re hidden after first being shown - would they still be requesting/loading RG data (as it loads /gets updates in realtime) ? Thanks

Anyone ? @keith perhaps ?

Would appreciate. Thanks

Is that really so hard to test?

(But no, a hidden reusable won’t actively process anything. You can’t communicate with it as data is passed to/from a reusable via states located on the outermost group of a reusable. When the reusable is hidden, these states don’t exist and aren’t targetable. This is, in fact, weird and not really a normal web dev thing to do (tying data to actual elements in the dom, but AFAICT, that’s what Bubble does).

At any rate, you shouldn’t rely on what some random person on the interweb tells you, nor should you wait for their response when you can easily test for yourself and share your insights with others who care about your issue.

I could be wrong about what I just said above. I don’t know it to be absolutely true in the current version of Bubble. The only way you can know for sure is to test it yourself. I’m not having any concerns about this particular topic at the moment and will not go and test this for you.

Reusable elements in Bubble are an interesting idea, but one that — like so many other things in Bubble — don’t really reach their full potential. What I would advise is that reusables should primarily be viewed as repeatable visual collections of elements and not as data processing structures, though they can be/are that as well. This conflation of the presentation layer and the data layer in Bubble is a fundamental failure IMHO and one should be cognizant of it.)

You’re not some random person, don’t be so humble :innocent:

I was simply seeking some help for something i haven’t been able to figure out - like most of us - and if i had the knowledge to test that bit out, i wouldn’t have been here.

Appreciate you taking the time anyway, find the second bit very interesting - will dig into it, but my initial question remains unanswered (to me) - must have not been clear enough