-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Labels
enhancementNew feature or requestNew feature or requestnextIssue/Pull Request for the next major versionIssue/Pull Request for the next major version
Description
Enhancement
A middleware for stores that can be used to persist sections of state to LocalStorage
and provides a mechanism to load from LocalStorage
.
// usage in a process
import { collector } from '@dojo/framework/stores/middleware/localStorage';
const localStorageCollector = collector<State>(
'local-storage-key',
(paths) => {
return [
path('my', 'state', 'path'),
path('my', 'other', 'state', 'path')
];
}
);
const process = createProcess('example', [ command ], localStorageCollector);
// usage to load local storage state
import { load } from '@dojo/framework/stores/middleware/localStorage';
load('local-storage-key', store);
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestnextIssue/Pull Request for the next major versionIssue/Pull Request for the next major version