Instructions
This plugin provides a lightweight global reactive state system for Bubble apps (client-side only).
To react to a global state, place a State Watcher element on the page. Each watcher listens to one specific state key, so if you want to watch multiple states you must add multiple watcher elements.
Configure the watcher by setting store name or leaving it empty to use the plugin-internal default one, key (the key of the state you want to watch), and type (the type of the state value: text, number, or yes / no).
To trigger workflows when the state changes, use the element event "When State Watcher change detected". The watcher will trigger this event every time the watched key is updated, deleted, or when the store is reset.
To read the current state value, use the exposed states text state, numeric state, and yes/no state. Only the exposed state matching the configured state type will be updated.
To update the global state, use the global actions Set text state, Set number state, Set yes/no state, Delete state, and Clear store.
NOTES: this is client-side state only, meaning data exists only while the page is open. Changing pages will reset the state unless the watcher and actions are used within the same page session.
WARNING: Keys are case-sensitive.