Closed shyndman closed 2 years ago
I can reproduce this. How did you disable HMR? I tried setting REACT_APP_FAST_REFRESH=false
in the .env
file with no luck.
Also, did you mean "based on worker-loader"? Do you recall how it was fixed there?
By the way, do you remember my comment https://github.com/michalochman/react-web-audio-graph/issues/8#issuecomment-974701370 about StrictMode
? I have just removed it and the AudioWorkletProcessor
is only created once. Why? I have no idea.
I do not want to spend much more time on this issue. If similar issue was happening in worker-loader and was fixed then maybe we can get it fixed in worklet-loader the same way. Otherwise we can drop StrictMode
and only enable it when needed or ignore this issue altogether.
Ah, sorry for disregarding that. I thought it seemed unrelated.
You know, I've actually mostly moved on to using Max (which, btw, is buggy but powerful). You wrote some great software, and it was fun learning some React, but I'm in it for the sound design. :)
Thanks for the update 👍. I'm going to close this issue then, since the issues does not bother me.
PR demonstrating the problem #9
Disabling hot module reloading resolves the issue. I have a feeling it could be an issue with worklet-loader, because it's based on worker-loader which had similar issues at some point.