react-native-mmkv
react-native-mmkv copied to clipboard
Recover from data corruption support?
@mrousavy wanna ask, does this library support Recover from data corruption ? I think this feature is quite important.
I didn't implement it because:
The repair rate is not promised, though. And you might get unexpected key values from recovery
And to me that's not a fair tradeoff. If the data really gets corrupted, it's probably safer to restart the app with a clean state instead of a partial repaired or weird/broken state.
I see. But, can you give me any clue on how to implement this? In my case, once data is corrupted it will break the session that is stored and force users to re-login. so instead of re-login, I wanna keep users login and then re-fetch the data from API if needed.