Yes…this is to ensure Bubble knows it is only needed when the reusable is visible, hence the use of conditions to give Bubble that instruction. Otherwise, if for example you have a repeating group inside of the reusable element that just simply has the data source set in default data source area, that data will get fetched even if the reusable is not visible on the page. Also, if there is a text element referencing the repeating group, even if that repeating group has a data source set conditionally for only when the reusable is visible, the text element will cause the aggregate search to have the count, so again, needing to give Bubble the instructions via the condition not to do that unless the reusable is visible, because the reusable is on the page, but just not visible due to the fact the navigation url parameter doesn’t have that ‘view’ open.
yes
if it is just a basic do a search without constraints, no, it would use the previously fetched data. If however, it has constraints, it depends on how those constraints may have changed.
So long as you are always using ‘go to page’ action and it is the same page as your SPA would be, then custom states are not lost…however, there is no material benefit to adding the usage of a custom state to hold onto the list of products. You can instead just put them into the repeating group via a search. And if the repeating group is not set to show all items immediately, you may see WU savings this way, since I’d imagine the approach implement with custom state was to fetch ALL products…if search is directly in the RG and not set to show all items immediately, you will not actually fetch all products.
@georgecollier had a tip about understanding where data comes from that gave some decent insights Understanding how searches and filters work in Bubble
What those insights help understand is with bubble lazy loading, if the user doesn’t scroll past first set of results batched in first fetch, you are not fetching all products. In my db, i get around 35 returned on a blank page, with one rg, with products that have 3 fields plus the built in fields.
Yes, that is good, but likely you are loading all search results into the custom state.
Not that I am aware of
Just what I presume to be a fetch of all products to set the custom state list of products