Invisible action-trigger (monster) inside reusables! No-plugin bubble trick!

How does one use JS2Bubble to communicate within reusables and with parent?

Think of JS2Bubble as a message sender and receiver.

You can send a message with Run javascript, and send any parameters you want. You send a message to a specific function (imagine this as a ‘channel’ you’re sending to).

With a JS2Bubble element where you want to receive the message, set the function name to the same name you used to send the message (i.e listen on the same channel we sent a message through). Then, JS2Bubble has a workflow event that you can use to run a workflow when it receives that message/function call.

Is it compatible with mobile editor ?

In theory I’d guess it would be since it’s just running Javascript - but that depends if the Mobile environment allows that, as believe its built on React Native so might not have that capability…one way to find out I guess.

AI says you can

AI says a lot of things! :rofl:

1 Like

You need to write javascript to be able to send the data. You’ll also need to write javascript to process the data in some way, like for modifying it or removing it from the output list value. You’ll also need to prefix your JSON array keys to be converted into the correct type of data it is. So it is a bit difficult to give step by step instructions for every possible action you might need to run on the data for CRUD operations.

If you don’t want to have to write the javascript each time you run the actions necessary, you could leverage Data Jedi Plugin for that. It is very flexible too as you can optionally when running an action determine if on a create action want to append values (ie: add onto existing list) or to replace the existing values with the new values, or to optionally trigger the related events which makes it very flexible and scalable as you can use the same single Data Jedi Element for different scenarios in which you work with the same type of data.

Toolbox is extremely powerful plugin that lets you run javascript, so if you can write javascript it is a great tool to have in your Bubble app as it allows you to do so much since it is code.

It is not, as far as I know the mobile and web plugins are different and have different editors etc. Currently mobile plugin editor is in alpha testing I believe, so no plugins available for web are cross compatible with mobile. What is cross compatible between web and mobile is the database and backend workflows and api…I think everything else are separate, so separate reusables and pages and plugins.