Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Ability to provide different storage driver as an option to launchnavigator.navigate #228

Open
1 of 3 tasks
krishnagopinath opened this issue Oct 21, 2019 · 2 comments

Comments

@krishnagopinath
Copy link

krishnagopinath commented Oct 21, 2019

I'm submitting a ...

  • bug report
  • feature request
  • documentation issue

This is a use case that our app would benefit from, but I also think it could be useful as an option for the plugin.

The app I work on uses WebSQL and IDB in a weird way*, which makes it very difficult to use this plugin reliably, because [email protected] has a precedence order of IDB, WebSQL and localStorage when it tries to store something. The plugin works the very first time but once we try to store the choice, any attempts to navigate via launchnavigator.navigate does not work!

My theory is that it tries to use our borked setups of IDB and WebSQL and returns nothing when navigate gets called.

In this case, it would be very beneficial to default localforage to just use localStorage and ignore other options. I tried this in a forked version and that seemed to work for my use case! 🎉

I also noticed that localforage takes in an options object into localforage which lets you specify a driver of your choice, like so:

localforage.createInstance({
 name: 'someName',
 driver: localforage.LOCALSTORAGE
})

I wonder if it be beneficial to expose this an option to launchnavigator.navigate, so it is more configurable!

Thanks for the all the hard work on this plugin!

@krishnagopinath
Copy link
Author

I'd be happy to submit a PR for this, if you don't have the time!

@dpa99c dpa99c changed the title Ability to provide different storage driver as an option to launchnavigator.navigate [FEATUREAbility to provide different storage driver as an option to launchnavigator.navigate Nov 23, 2019
@dpa99c dpa99c changed the title [FEATUREAbility to provide different storage driver as an option to launchnavigator.navigate [FEATURE] Ability to provide different storage driver as an option to launchnavigator.navigate Nov 23, 2019
@dpa99c
Copy link
Owner

dpa99c commented Nov 23, 2019

Added to the backlog but if you are able to submit a PR to implement this I will be able to review it more quickly and push out in a patch release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants