Skip to content

Local Storage middleware include example of when to register it #436

@baerrach

Description

@baerrach

I'm submitting a feature request

Current behavior:
In https://aurelia.io/docs/plugins/store#default-middlewares for The Local Storage middleware the info box gives a great hint about not registering the Local Storage middleware at startup, since that will just save the initial state into local storage.

It recommends to "make sure to register the middleware just after the initial state has loaded."

But state doesn't have any lifecycle bindings.

Should this be placed into the bind() method?
What happens if I am using the connectTo decorator?

Extending this infobox with an example would be super helpful.

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