Skip to main content

Events and Interactivity

Events in Superblocks Applications function the same as events in other programming languages, such as JavaScript. That is, events notify the application of changes in the system to which developers can define how the application reacts accordingly. Examples of events in Superblocks include:

Event handlers allow you to define the logic for how your application responds to these events, through a series of actions. These actions can be used to run your APIs, execute custom JavaScript, navigate to another application, and even trigger other events with their own set of event handlers and actions.

As a basic example, here an application allows a user to click a button in a table row to open a modal with a detailed view.

Event diagram

This also demonstrates how events can be chained together, where an action based on one event can trigger another event and so on. In this case, the second event is the modal opening, which triggers its onOpen event handler, which performs the action of running an API to populate the shipping history.

Additional resources

To learn more about events and event handlers, see the resources below.

Event Handlers

Learn how to trigger actions from application events.

PageLoad

Respond to the application load event.

Timers

Trigger actions on a timed interval.

Custom Events

Create named events, and configure actions to perform when the event is triggered.