Reusable elements (beginner question)

Hello,

I’m starting to build an app on bubble - i already made some progress but i read something that made me rethink the way i’m building. I read someone on twitter saying that we should use way more reusable elements when building oni bubble for performance reasons.

What do you think? At the moment i already build a login page, a settings page(to change profile info) etc using pages, should i use reusable elements instead?

Thank you,

Kind Regards

I hadn’t heard of reusable elements being good for performance (or bad for that matter) - I did some Googling and nothing came up concerning this. I feel the best reason to use a reusable element is if that element is going to appear on multiple pages, and you need it to match identically - and you need to know that if you edited it, it’ll be the same page to page. Website headers and menus are a god example of this.

1 Like

Ah got it, I misunderstood - I had thought you meant performance on the live app (for users). I wouldn’t worry about editor performance unless you are actually seeing slow-downs/ issues with the editor interface. If you do, there’s a few experimental features you can turn on to help with that.

1 Like

Are good when you want the same thing in multiple places because then updating in just 1 location.

I have not heard of using it for ui performance.

Did not hear or notice anything about performance. Indeed, it is the way to easily reuse elements & logic in different places.

Especially the logic part people tend to forget. You can create a reusable element with a library of custom events & logic (functions), for instance everything related to sales orders (create, edit, delete). Add the custom event to the page and all those custom events can be used (action trigger a custom event from a reusable element). For example, when you add a field to the sales order data type, you only need to edit the function(s) in one place. And now that Bubble announced that custom events will also be able to return data in the near future, it will probably became the standard to organize the logic in your app.

Note, you can already have custom events return data by using custom states.

Another note: In case you already have performance issues in the browser, I noticed better performance after activating the ‘Memory Saver’ setting in Chrome - <3 dots> - Settings - Performance.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.