Open stephanpelikan opened 6 years ago
I believe you need to use an older version of React Hot Loader, one that doesn't rely on Fiber internals.
I used every version down to 3.0.0: Always the same result. The next version before is 1.3.0 but this version does not work at all.
They are heavily working on 4.0.0. Will this be compatible to preact? If not, do you have any plans regarding hmr and preact?
Not sure - as far as I'm aware, the RHL folks don't pay much attention to Preact.
I'm using react-hot-loader for preserving component's state on HMR. This seems to work. But on the very first change after initial page load I get this error:
The change itself is applied and also state is preserved. Every further change runs without this error and is applied as well.
I tried using preact-deep-force-update
but then the feature of preserving state is not and only pure HMR is working.
As you can see on the screenshot am even starting my project and I'm using preact for the first time. So I'm not sure the react-hot-loader is fully operational when I get this error. I hope you can tell me whether subsequent code of the function causing the error matters to preact HMR or you even can provide a workaround/solution for this issue.
Thx, Stephan
By the way: I'm using Typescript and not Babel. But I don't think this matters at all.
PS: My dependencies are