aurelia / aurelia/documentation

Local Storage middleware include example of when to register it

Open
#436 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
104
Forks
108
PR merge metrics
No merged PRs in 30d

Description

**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.

Contributor guide

Open the contributing guide

Research direction

Start with the “The Local Storage middleware” section under default-middlewares in the Aurelia documentation. Clarify when to register the middleware after initial state loading, including whether bind() or the connectTo decorator is appropriate, and consider adding the requested usage example.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.