Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion packages/mmkv-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ npm install @rozenite/mmkv-plugin react-native-mmkv

### 2. Integrate with Your App

Add the DevTools hook to your React Native app and provide your MMKV instances:
#### For MMKV < 4.0.0
Add the DevTools hook to your React Native app and provide your MMKV instances as array:

```typescript
// App.tsx
Expand All @@ -63,6 +64,29 @@ function App() {
}
```

#### For MMKV >= 4.0.0
Add the DevTools hook to your React Native app and provide your MMKV instances as object:

```typescript
// App.tsx
import { createMMKV } from 'react-native-mmkv'
import { useMMKVDevTools } from '@rozenite/mmkv-plugin';

// Create your MMKV instances
const userStorage = createMMKV({ id: 'user-storage' });
const appSettings = createMMKV({ id: 'app-settings' });
const cacheStorage = createMMKV({ id: 'cache-storage' });

function App() {
// Enable MMKV DevTools with your storage instances
useMMKVDevTools({
storages: {userStorage, appSettings, cacheStorage},
});

return <YourApp />;
}
```

**With blacklist filtering:**

```typescript
Expand Down