muchobien / flipper-plugin-react-native-mmkv

Plugin to control react-native-mmkv from Flipper
https://github.com/muchobien/flipper-plugin-react-native-mmkv
52 stars 3 forks source link

Can i have 2 instances of initializeMMKVFlipper #9

Closed AngelRmrz closed 11 months ago

AngelRmrz commented 1 year ago

Currently i need to have 2 storages one for apollo client and another one for zustand, but im facing the issue that just the apollo one is showing in the flipper app.

This is the code

if (__DEV__) { initializeMMKVFlipper({ state: apolloStorage, }); } if (__DEV__) { initializeMMKVFlipper({ state: stateStorage, }); }

KROSF commented 1 year ago

this is not supported on the flipper side

AngelRmrz commented 11 months ago

I think yes, the code below is how i implemented that functionality in a utils folder

export function initializeDevTools() {
    console.info('Dev tools initialized successfully 🚀👨🏽‍💻👾');
    initializeMMKVFlipper({
        stateStorage,
        apolloStorage,
    });
    apolloDevToolsInit(client);
}

And then u calle it inside the app.tsx file

if (__DEV__) {
    initializeDevTools();
}