What’s the best way to pass an action and information up a reusable chain?
At the moment I think it’s a run JavaScript action (trigger) with JStoBubble (register action) but interested to hear other approaches.
Example:
Page
- reusable (action registered)
-
- reusable (action triggered)
I usually pass data or trigger page actions, by referring to a state in the Reuseable since I can access them from anywhere.
Alternatively, URL params work too.
I don’t believe there’s a better way than this… in my view it’s by far the the simplest, and cleanest way to do it, and it’s the only method I would use personally (in most situations).
The only downside is it can be hard to keep track of where the JStoBubble elements are, and where they are invoked - but proper use of comments and naming conventions can handle that.
Curious to know if you’re finding it problematic (hence the reason for asking), or just asking about alternatives?
@adamhholmes nice to have some validation from the best ;). and thanks @ihsanzainal84 for the other method.
Like everything in Bubble, there’s several ways to approach the problem - and just curious to know any other approaches.
For anyone unfamiliar with the approach
- Set up a JStoBubble with a unique identifier on your page or reusable element with the actions you desire
- The key in step one is that it needs to be visible to be listening
- This can then be triggered by any workflow (on the page , resuable etc) using
run javascript
- Protect as necessary (these actions can be run easily from the console.)