6

React Native Flipper plugin for React Native MMKV Storage

 1 year ago
source link: https://reactnativeexample.com/react-native-flipper-plugin-for-react-native-mmkv-storage/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Storage

React Native Flipper plugin for React Native MMKV Storage

Jul 07, 2022 1 min read

React Native Flipper plugin for React Native MMKV Storage

Use this with my Flipper desktop plugin

gif

* Tested on Flipper v0.152.0, React Native v0.68.2, RN MMKV Storage source code from github

Requirement

react-native-mmkv-storage v0.8.0 or newer. Older versions (from 0.6.1 to 0.7.6) are compatible but some logs can’t be shown

Install

yarn add react-native-flipper rn-mmkv-storage-flipper --dev
npm i react-native-flipper rn-mmkv-storage-flipper -D

Your code:

import {MMKVLoader} from 'react-native-mmkv-storage';
import mmkvFlipper from 'rn-mmkv-storage-flipper';

const MMKV = new MMKVLoader()
  .withInstanceID('test')
  .withEncryption()
  .initialize();

if (__DEV__) {
  mmkvFlipper(MMKV);
}

My Android app crashes nonstop

This is known issus on Flipper. The workaround is keep Flipper opening while running app on debug mode, no crashes on release.

GitHub

View Github


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK