Skip to content

IndexedDb for persist state? #125

Answered by NetanelBasal
floinay asked this question in Q&A
Discussion options

You must be logged in to vote

You can provide a custom strategy.

import * as localForage from 'localforage';

localForage.config({
  driver: localForage.INDEXEDDB,
  name: 'Elf',
  version: 1.0,
  storeName: 'elf',
});

export const persist = persistState(authStore, {
  key: 'auth',
  storage: localForage,
});

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@floinay
Comment options

Answer selected by floinay
Comment options

You must be logged in to vote
4 replies
@NetanelBasal
Comment options

@arochoab
Comment options

@NetanelBasal
Comment options

@arochoab
Comment options

Comment options

You must be logged in to vote
1 reply
@arochoab
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #124 on January 24, 2022 08:47.