Skip to content

Commit 8cb4c16

Browse files
committed
Adding option to change storage driver
Signed-off-by: RJ Garcia <[email protected]>
1 parent 53a8853 commit 8cb4c16

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/persistState.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default function persistState(paths, config) {
2424
slicer: createSlicer,
2525
serialize: JSON.stringify,
2626
deserialize: JSON.parse,
27+
storage: localStorage,
2728
...config
2829
}
2930

@@ -41,6 +42,7 @@ export default function persistState(paths, config) {
4142
initialState = undefined
4243
}
4344

45+
const localStorage = cfg.storage;
4446
let persistedState
4547
let finalInitialState
4648

0 commit comments

Comments
 (0)