Skip to content

Add HMR support #2

Description

@lukaszkrzywizna

Currently, Elmish-Store maintains an internal map of all store instances to preserve state when createStore is invoked with the same key again, which is particularly useful for scenarios like Hot Module Replacement (HMR). Nonetheless, there are situations where the store's code may be reloaded, necessitating the integration of true HMR capabilities that leverage the tools provided by bundlers. As a starting point, integrating with Vite would be beneficial, given its popularity.

Furthermore, the process of rebuilding the state could be optimized to account for potential changes in the model type. For inspiration on implementing this feature, consider examining the approach taken in the Fable.Solid implementation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions