Open krishnagopinath opened 5 years ago
I'd be happy to submit a PR for this, if you don't have the time!
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.
I'm submitting a ...
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
localforage@1.5.0
has a precedence order ofIDB
,WebSQL
andlocalStorage
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 vialaunchnavigator.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 uselocalStorage
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 anoptions
object intolocalforage
which lets you specify a driver of your choice, like so: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!