Closed OnurGumus closed 1 year ago
Created this PR https://github.com/fable-compiler/Fable.Lit/pull/78
Though I have a concern.
Should we really rerun elmish when props of lit element has changed? I am inclined to do so. Secondly, not sure if we should clean subscriptions the previous elmish loop had some.
Neah I found a better approach. I can call the dispatcher directly to update to model with incoming values.
When you use Hook.useElmish inside a LitComponent, it re-renders when props change. But doesn't re-run the elmish loop making state doesn't change.