SPA Best Practices

Hey Ppl!

Im trying to build a SPA for linkedIn Automation and im wondering how to use Reusable Elements for an high efficiency.

Do you use reusable for every Menu Section for better organisation?
Or what are your criteria for using reusables?
For effiency would it be better to only focus on reusable elements?

appreciate any help!

I use reusables as the pages. Use an option set for navigation such that the conditional on each reusable(page) can be “when (get data from page url…path segments as list) item #3’s display is X, this element is visible” and then I would avoid using further smaller reusables within each page.

I still use this framework to this day: Single-page application framework: App Shell [free tutorial] - #30 by mossoc99

Now that reusables can take multiple variables, there’s a ton more new use cases. I use it for the navigation, “pages” of the SPA, and anything that I catch myself doing multiple times. If a page is getting messy, slice it with reusables.

Also, a thing I learned recently, don’t put reusable workflows in the backend, put them in the frontend. It’s much faster that way because – I think – Bubble does optimistic db updates. I’m re-reading this article by @guillaume.maison and I’ll try to put it to good use.

2 Likes

saw your video already @rico.trevisan . Helped me a lot!

Also, if it’s any indication:

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