Open
Description
Description:
Currently, there's no straightforward way to check if an MMKV instance with a specific ID already exists. This functionality would be useful for managing multiple MMKV instances and avoiding conflicts or unnecessary instance creation.
Feature request:
Add a static method to the MMKV class that allows checking for the existence of an instance with a given ID.
Proposed usage:
import { MMKV } from 'react-native-mmkv'
const instanceExists = MMKV.exists('some-id')
console.log(instanceExists) // Should return true or false
Benefits:
- Simplifies instance management in apps using multiple MMKV stores
- Helps prevent accidental overwriting of existing instances
Metadata
Metadata
Assignees
Labels
No labels