-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
Examples: add Tanstack Start SSE #2356
base: main
Are you sure you want to change the base?
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit cdad546. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 2 targetsSent with 💌 from NxCloud. |
@microsoft/fetch-event-source was last updated 3 years ago. I ended up just going with extended-eventsource myself. |
@jadejr can you create an example based on that? |
Not until I at least have time to play with tanstack start in the first place. It's just a project I'm following. I'm not sure what I think of it just yet. |
Hello there!
This PR adds an example for SSE to Tanstack Start. Used EventEmitter on the server side and added @microsoft/fetch-event-source to help with making event listening on the client side easier.
The PR in essence is an extended version of the counter-example w/ react query and sse
side note: unsure if my approach of combining the event listener with
useQuery
good strategy, but it worked well enough. It's inspired by Tkdodo's websocket articleWould love to get some feedback if ya'll have capacity/time!