ammarahm-ed / react-native-mmkv-storage

An ultra fast (0.0002s read/write), small & encrypted mobile key-value storage framework for React Native written in C++ using JSI
https://rnmmkv.now.sh
MIT License
1.59k stars 111 forks source link

Question: Are race conditions handled gracefully? #289

Closed ga-reth closed 2 years ago

ga-reth commented 2 years ago

Want to start by saying this library is wicked, thanks for taking the time!

Am considering using this, but am wondering if I need to add some protection against a potential race condition.

For example:

Do you know if the use of useIndex is subject to such an issue? specifically when using the update?

I believe the use of the async api mitigates this, but am curious regarding the hook