Dama Lo
Dama Lo
close, use `@RouteConstraints({ logLevel: 'silent' })` instead.
You should use `useRef` to store a AbortController instance, this is the React part.
```js const useStreamTradingNotifications = () => { const abortControllerRef = useRef(); useEffect(() => { console.log("useEffect called"); const stream = async () => { abortControllerRef.current = new AbortController(); await fetchEventSource("http://127.0.0.1:8000/v1/notifications", {...
`ref.current` will not change in rerender, so it is the same instance.
@bflemi3 This is not my code. just illustrate, when the react component is unmounted, the SSE connection will close. Here is my real project code. ```ts const abortControllerRef = useRef();...