Repository archived. All code was moved to https://github.com/keneanung/nexus-scripts and lives on there. For more background, please read https://keneanung.github.io/nexus-scripts/blog/2023/06/23/_a_new_home.
An implementation of the publish-subscriber pattern at its core.
To install the package, first download it to your machine via this link.
You can then proceed to install it as a normal package into your Nexus profile. You may have to log in and out after installing the package.
When the package is installed, you can use it in any script
reflex. First you will need to subscribe to an event.
eventBus.subscribe('myEvent', (data) => {
console.log(data);
});
To raise an event, you can use the raise
method.
eventBus.raise('myEvent', 'Hello World!');
This will print Hello World!
to the console.
For documentation on the inidividual methods, advanced usage and some best practices, see the Nexus Event Bus documentation.