Skip to content
Discussion options

You must be logged in to vote

with Remix I insure indexeddb is opened by putting in my clientLoader a code like this

  const dbExists = await new Promise(resolve => {
    const request = indexedDB.open('app-storage')
    request.onsuccess = event => {
      resolve(true)
    }
    request.onerror = event => {
      resolve(false)
    }
  })
  const apps = dbExists ? selectApps(useAppsStore.getState()) : []

Replies: 9 comments 17 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@fredericrous
Comment options

Answer selected by dbritto-dev
@KingXP-Pythoner
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
12 replies
@dai-shi
Comment options

@kettanaito
Comment options

@dbritto-dev
Comment options

@kettanaito
Comment options

@dbritto-dev
Comment options

Comment options

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

Comment options

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

Comment options

You must be logged in to vote
1 reply
@kettanaito
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
10 participants