This is an example of how to use Remix's Defer feature in combination with an EventStream to stream progress updates to the client.
https://www.jacobparis.com/guides/remix-defer-streaming-progress
1 messages · Page 1 of 1 (latest)
This is an example of how to use Remix's Defer feature in combination with an EventStream to stream progress updates to the client.
https://www.jacobparis.com/guides/remix-defer-streaming-progress
A live example in production is here https://chesspres.so/gif
Just pondering/dreaming/ideating, could this also be used in action data when uploading files to a database?
So you can get streaming progress of a file upload to the db?
Your action need to write the progress somewhere, and then you can use an event stream resource route to stream that progress back to any page that wants to read it
the action cannot stream progress back itself though
In this example I write to the filesystem via JSON but you could more easily write it to a DB like sqlite
Interesting. Mind is racing now haha. Thanks!
That’s awesome
Very cool!
Nit: your item.$hash.tsx has a setInterval with no second argument
ah good catch, thank you
nice! very creative & practical use of SSEs!