Closed cmeeren closed 5 years ago
In fact, it seems to be possible to repro this just using the standard https://github.com/MangelMaxime/fulma-demo without my modifications to the app code.
Ok I think I know the reason.
To detect the HMR in the lazyView we use if isNull Browser.window?HMR_Count then
but it seems like isn't set...
I don't know why i got it setted in my test app.
Ah ooops....
HMR_Count
is something coming from my debug app when I was debugging the HMR problems. Will include it in the library nice catch ^^
nice catch ^^
Just a lucky break, really. Trying to get the Fulma demo to run on Electron, but I have almost no idea what I'm doing. Pure coincidence that I tracked this down to the version of Fable.Elmish.HMR. Can't even remember now (an hour later) how that happened. Happy to help in any case. :)
But what do you mean by locked ? Because, HMR is indeed not working but the app is still fully functionnal from test.
Did you make a full reload of the tab ?
In my repro solution you'll easily see what I mean. In the fulma demo, you can try submitting a comment, and observe that nothing happens.
Ok I wasn't testing the submit feature but navigation which was working.
Well, my fix seems to fix your issue finally. Will publish it
Should be fixed in version 3.0.2
.
It has been publish but nuget needs to do it job now.
Thanks! Will try out.
I see that 3.0.0 was released only a handful of hours ago. I had no idea. Talk about timing!
Ok, I tested the new version in Fulma-demo and it seems to work for me.
Feel free to re-open if needed.
Works for me too. Thanks a lot!
Description
I have a problem where if I use version 3 of the HMR nuget, the app locks after the first HMR update after I have made state changes, whereas with version 2, it works fine.
Repro code
Repro solution: fulma-demo.zip
(Not minimal, it's a slightly modified version of https://github.com/MangelMaxime/fulma-demo where I've replaced the app contents with a TodoMVC sample. Contains a lot of dead code from the fulma demo; only the code in
src/App.fs
is relevant.)fake build -t Watch
localhost:8080
src/App.fs
that should be visible with HMR (e.g. replace"TodoMVC"
near the bottom with another string)paket.dependencies
and remove< 3
fromnuget Fable.Elmish.HMR < 3
paket update
|> Program.withHMR
fromsrc/App.fs
dotnet fable --version
, don't know if that's the right thing)