Managing duplicated logic

Hi guys,

I’m building an app in Bubble and as it grows I’m beginning to find that some logic (e.g. does a user have access to a feature) is getting quite out of hand and is being duplicated in multiple places. I’d really love to have something like Current User has access to feature where has access to feature is a bit of custom logic but I don’t believe this is possible. What is the next best way of having a single place for logic that I can reuse throughout the app? It would help reduce technical debt massively.


You can probably achieve this with DB Triggers (manual link).

So you can keep the access logic nice and simple (as you mentioned above) and push the complexity to the db triggers.

Thanks Rico. This seems like it may be a solution. I’m also envisioning something with a reusable element which has its state updated page load, though I’m not sure how flexible this will be.