🗃️ Data Container

Synchronize states and events with any database or RPC component in your app


The data container element allows you to synchronize states and events with any database or RPC component in your app sharing the same Link ID.

When multiple data containers use the same Link IDs, they automatically align their states and receive corresponding events from the connected database or RPC component.

Data container simplifies data management, as you can, for example, fetch and update data through a single database component and get updates across your app (e.g. reusable).


Setup

Add the element Supabase Data Container to your page.

Supabase - Database settings

Fields

  • Name
    Data Type
    Type
    string
    Description

    Data type that you have initialized through the API connector. Must be the same type than the linked database or RPC component.

  • Name
    Link ID
    Type
    string
    Description

    Link ID as defined on the database or RPC component.


States

The element exposes the following states:

  • Objects: contain the objects retrieved from your Supabase table or function.
  • Object: in case the results contain only one object, this field will contain that specific object retrieved from your Supabase table.
  • Status Code: the status code will be '200' in case of success, and a different code in case of an error.
  • Status Message: the status message will be 'success' in cases of success, and it will contain error details in cases of an error.

Events

The element triggers the following event:

  • Has Changed: when receiving response from Supabase
  • Error Received: when receiving an error from Supabase
  • Real-Time Insert Detected: triggered upon a new record insertion into the linked database
  • Real-Time Update Detected: triggered upon a record update in the linked database
  • Real-Time Delete Detected: triggered when a record is deleted from the linked database

Demo

Use cases
Data container - Synchronize states and eventsEditorDemo

Do you need any help? Feel free to reach out