reactotron-react-native-mmkv
TypeScript icon, indicating that this package has built-in type declarations

0.2.8 • Public • Published

reactotron-react-native-mmkv

Log updates to your react-native-mmkv store in the Reactotron timeline.

Installing

npm i --save-dev reactotron-react-native-mmkv
# or
yarn add -D reactotron-react-native-mmkv

Usage

Import your mmkv storage instance:

import { MMKV } from "react-native-mmkv"
export const storage = new MMKV()

To use the mmkvPlugin, add the additional plugin on the import line.

import Reactotron from "reactotron-react-native"
import type { ReactotronReactNative } from "reactotron-react-native"
import mmkvPlugin from "reactotron-react-native-mmkv"
import { storage } from "./mmkv/storage/instance/location" // <--- update this location
...
Reactotron.configure()
  .use(mmkvPlugin<ReactotronReactNative>({ storage })) // <--- here we go!
  .connect()

And you're done! Now you can see your MMKV in Reactotron.

Advanced Usage

mmkvPlugin() accepts an object with an ignore key. The value is an array of strings you would like to prevent sending to Reactotron.

mmkvPlugin<ReactotronReactNative>({
  storage,
  ignore: ["secret"],
})

Readme

Keywords

none

Package Sidebar

Install

npm i reactotron-react-native-mmkv

Weekly Downloads

27,130

Version

0.2.8

License

MIT

Unpacked Size

12.7 kB

Total Files

10

Last publish

Collaborators

  • infinitered-owner