Closed Zaid-Ajaj closed 5 years ago
Hum so the problem is that when triggering HMR, the view rendered/accessible is the old one.
So when you click you are clicking in the old program instance which is marked as Inactive
. I need to understand why the view from the new program instance is not rendered to take precedence over the old view.
It should be fixed in Elmish.HMR 4.0.1
The problem was because we had open Elmish.React
at the top of the file. Then when shadowing Elmish.React
API we were using the LazyView
from Elmish.React
instead of the one from Elmish.HMR
which knows when to force a rendering. :)
You are awesome @MangelMaxime I just tested it and works really nice! thanks a lot
Description
On the initial load, HMR works properly and I am able to make changes on the fly:
but after dispatching any message, the whole dispatch loop is frozen and the application stops working
Repro code
To reproduce the bug, I made a repo elmish-hmr-bug, follow the steps:
https://github.com/Zaid-Ajaj/elmish-hmr-bug.git
Expected and actual results
Expected HMR to work after dispatching a message.
Related information