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

Examples: add Tanstack Start SSE #2356

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

MrNiceRicee
Copy link

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 article

Would love to get some feedback if ya'll have capacity/time!

Copy link

nx-cloud bot commented Sep 19, 2024

☁️ Nx Cloud Report

CI 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 targets

Sent with 💌 from NxCloud.

Copy link

pkg-pr-new bot commented Sep 19, 2024

Open in Stackblitz

More templates

@tanstack/eslint-plugin-router

pnpm add https://pkg.pr.new/@tanstack/eslint-plugin-router@2356

@tanstack/create-router

pnpm add https://pkg.pr.new/@tanstack/create-router@2356

@tanstack/history

pnpm add https://pkg.pr.new/@tanstack/history@2356

@tanstack/react-cross-context

pnpm add https://pkg.pr.new/@tanstack/react-cross-context@2356

@tanstack/react-router

pnpm add https://pkg.pr.new/@tanstack/react-router@2356

@tanstack/react-router-with-query

pnpm add https://pkg.pr.new/@tanstack/react-router-with-query@2356

@tanstack/router-arktype-adapter

pnpm add https://pkg.pr.new/@tanstack/router-arktype-adapter@2356

@tanstack/router-cli

pnpm add https://pkg.pr.new/@tanstack/router-cli@2356

@tanstack/router-devtools

pnpm add https://pkg.pr.new/@tanstack/router-devtools@2356

@tanstack/router-generator

pnpm add https://pkg.pr.new/@tanstack/router-generator@2356

@tanstack/router-plugin

pnpm add https://pkg.pr.new/@tanstack/router-plugin@2356

@tanstack/router-valibot-adapter

pnpm add https://pkg.pr.new/@tanstack/router-valibot-adapter@2356

@tanstack/router-vite-plugin

pnpm add https://pkg.pr.new/@tanstack/router-vite-plugin@2356

@tanstack/router-zod-adapter

pnpm add https://pkg.pr.new/@tanstack/router-zod-adapter@2356

@tanstack/start

pnpm add https://pkg.pr.new/@tanstack/start@2356

@tanstack/virtual-file-routes

pnpm add https://pkg.pr.new/@tanstack/virtual-file-routes@2356

@tanstack/start-vite-plugin

pnpm add https://pkg.pr.new/@tanstack/start-vite-plugin@2356

commit: cdad546

@jadejr
Copy link

jadejr commented Oct 19, 2024

@microsoft/fetch-event-source was last updated 3 years ago. I ended up just going with extended-eventsource myself.

@schiller-manuel
Copy link
Contributor

@jadejr can you create an example based on that?

@jadejr
Copy link

jadejr commented Oct 22, 2024

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.

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

Successfully merging this pull request may close these issues.

4 participants