Closed krispya closed 3 months ago
I investigated this a little more and found that the dispose
cb doesn't work how I expect it to. The best recommendation is to just move the schedule and the adds to its own module so that if it gets HMRed it gets rebuilt completely. A React hook should help make this simple since it supports cleanup functions.
Using the scheduler with HMR is a bit problematic. So far I have two obvious issues:
It looks like a solution will involve implementing our own HMR dispose functions: https://vitejs.dev/guide/api-hmr#hot-dispose-cb