You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered: