Skip to content

[TRI-4119] Realtime for vanilla JS from the frontend #1507

Open
@matt-aitken

Description

@matt-aitken

Currently it's only really possible to consume Realtime on the server using @trigger.dev/sdk, or in the browser using @trigger.dev/react-hooks.

You can't use the @trigger.dev/sdk realtime functions inside a browser because there's some Node.js only stuff in there. It's pretty difficult for people to look at the source code for the react-hooks package and adapt it for other frameworks/vanilla JS.

Solution

Create a new export from the @trigger.dev/sdk package with realtime functions that can be used in the browser, e.g. @trigger.dev/sdk/v3/browser. Make these functions useful for consuming the Realtime stream and converting it into run data.

These functions could then be added to a vanilla JS guide. If they're easy to use then hopefully we can create code snippets or packages for other popular frameworks like SvelteKit, Vue, Solid etc.

TRI-4119

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions