Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom storage never used

See original GitHub issue

When setting a custom storage engine vie the config

const config = {
  storage: myStorageEngine,
  userAttributes: {
    firstName: 'first_name',
    imageUrl: 'image',
  userRegistrationAttributes: {
    firstName: 'first_name',

the passed custom storage is never used.

I think this is due to this line

Since flushGetRequests is only present in react native localStorage, the code always fallback to AsyncLocalStorage, which itself default to window.localStorage.

Shouldn’t that ternary operator expression reversed ?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

wa0x6ecommented, Jun 6, 2018
alopescommented, Jun 6, 2018

From what I can observe, passing custom storage in the config doesn’t work at all with the npm package. That’s the issue I’m trying to raise here. Regarding your point with storage.flushGetRequests, I believe you are correct. I had to mock flushGetRequests to get cookies as the storage mechanism. Thanks for pointing that out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Sneak Custom Storage Into Every Room of Your House
From custom closets to faux built-ins and on-the-wall organizers, here's how to work extra storage space into your home's design plan.
Read more >
Using custom storage engine on React Native #599 - GitHub
Run it with the Android emulator and SET_ITEM is logged. Run it with the iOS emulator and SET_ITEM is never logged.
Read more >
37 Ways to Add Extra Storage to Every Room - This Old House
Here's how to build a beautiful, custom window seat in just a couple of days using ready-made kitchen cabinets. This simple, do-it-yourself approach...
Read more >
37 Corner Storage Options (Every Room Covered) - Pinterest
Jan 27, 2019 - Check out these 37 different types of corner storage options. Includes kitchen corner storage, bathroom, living room, home office,...
Read more >
6 Storage Designs For Your Custom Home
You've tried using a pantry organizer before but it never worked for you! You're tired of cooking in a cramped kitchen with no...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found