You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems disposing of side effects does not work. If I have some background task running (job scheduler, db watcher, etc.) in my server, I usually gracefully clean it up on shutdown by listening for signals.
In order for this to work in HMR, my understanding is that I need to register a dispose callback in the file with the side effect. E.g.:
It seems disposing of side effects does not work. If I have some background task running (job scheduler, db watcher, etc.) in my server, I usually gracefully clean it up on shutdown by listening for signals.
In order for this to work in HMR, my understanding is that I need to register a dispose callback in the file with the side effect. E.g.:
However, the callback is never called, so I'll have two intervals printing pings.
Reproduction:
https://stackblitz.com/edit/node-qfyzmw?file=index.ts,fileWithSideEffect.ts
Change e.g. 'ping' -> 'ping1'
Reload right side
The text was updated successfully, but these errors were encountered: