react-native-windows icon indicating copy to clipboard operation
react-native-windows copied to clipboard

Add quirk setting to always use sqlite3 for AsyncStorage

Open rozele opened this issue 1 year ago • 3 comments

Summary

Currently, we use Windows.Storage for AsyncStorage for apps with a valid package identity and sqlite3 for those without a valid package identity. There should be an option to always prefer the sqlite3 implementation of AsyncStorage.

Motivation

We use sqlite3 AsyncStorage in both packaged and unpackaged versions of our app.

Basic Example

No response

Open Questions

No response

rozele avatar Jul 25 '22 21:07 rozele

Isn't AsyncStorage marked deprecated from core? We've been directing people to community modules for their needs here. So we shouldn't really be expanding its role, unless the intent is to un-deprecate in RN core. Agree?

chrisglein avatar Jul 28 '22 18:07 chrisglein

I'm not so sure this is a bad thing to add before folks are forced to migrate to the community module. At least by adding this, it creates an easier migration path (assuming https://github.com/react-native-async-storage/async-storage is compatible with the Win32 AsyncStorage module). Users first set the quirk setting and get everything working there, then hop over to the community module. And when we actually remove AsyncStorage, we kill the quirk setting with it.

rozele avatar Jul 29 '22 16:07 rozele

assuming https://github.com/react-native-async-storage/async-storage is compatible with the Win32 AsyncStorage module

I actually believe that they are not compatible. Which is a pain point raised about a year ago but hasn't risen in anyone's priority enough to warrant addressing.

chrisglein avatar Aug 01 '22 18:08 chrisglein