Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
matt-aitken opened this issue Nov 28, 2024 · 0 comments
Open

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

matt-aitken opened this issue Nov 28, 2024 · 0 comments

Comments

@matt-aitken
Copy link
Member

matt-aitken commented Nov 28, 2024

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

@matt-aitken matt-aitken changed the title Realtime for vanilla JS from the frontend [TRI-4119] Realtime for vanilla JS from the frontend Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant