Open KapStorm opened 1 year ago
Looking at the issues I found the same issue: https://github.com/shadaj/slinky/issues/547
Interesting, which version of Slinky are you using? You seem to be running into the exact same issue, but it should be fixed in the latest release.
0.7.3 (ref), my understanding is that the issue should be fixed in this version.
That is very strange, might be some weird interaction between the proxied hot-reloading class. I'll try to test locally when I get a chance, might be a bit before I can get to it though unfortunately.
In the meantime, is using React Refresh via https://github.com/pmmmwh/react-refresh-webpack-plugin an option? It does miss out on preserving component state but that's what I use via Next for the docs site. The current hot reloading support depends on a very old library, so might be worth investing in Refresh for the future.
In the meantime, is using React Refresh via https://github.com/pmmmwh/react-refresh-webpack-plugin an option?
We could give it a try, we don't preserve component state because we use functional components.
Thanks for the hint.
We are migrating our Slinky project from Scala 2 to Scala 3 and we have problems when we initialize slinky-hot, causing pages to fail to load and print console.errors in the browser console
To reproduce this we are calling
hot.initialize()
in the Main file. Removinghot.initialize()
solves the load problemOur project in the scala 3 branch https://github.com/wiringbits/scala-webapp-template/tree/scala3
Browser console errors
Main.scala