-
Hey there, Client Side I came up with the Following but it is kind of ugly and throws a 404 Not Found Error: const [ url, setUrl ] = useState( '/sse/time' );
let live = useEventSource( url, { event: 'time' } );
useEffect( () => {
setTimeout( () => setUrl(), 5000 );
}, [] ); |
Beta Was this translation helpful? Give feedback.
Answered by
sergiodxa
May 11, 2023
Replies: 1 comment 2 replies
-
I wrote about how to do this here https://sergiodxa.com/tutorials/close-sse-connection-from-the-server-in-remix |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
sergiodxa
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wrote about how to do this here https://sergiodxa.com/tutorials/close-sse-connection-from-the-server-in-remix