flipper-plugin-react-native-mmkv icon indicating copy to clipboard operation
flipper-plugin-react-native-mmkv copied to clipboard

Able to track underlying database without connecting via JS?

Open henrymoulton opened this issue 3 years ago • 4 comments

https://github.com/muchobien/flipper-plugin-react-native-mmkv/blob/main/packages/react-native-mmkv-flipper-plugin/index.ts#L29

My understanding is that it would be better to connect to the MMKV instance directly, perhaps using the Databases approach the Flipper documentation highlights, it might be more performant. https://fbflipper.com/docs/setup/plugins/databases/

henrymoulton avatar Jan 24 '22 02:01 henrymoulton

Assume this is why @mrousavy asked https://twitter.com/mrousavy/status/1485336871576215552

but maybe there's another reason.

henrymoulton avatar Jan 24 '22 02:01 henrymoulton

thanks @henrymoulton, but for now i will add support for several instances and wait for databases to be available for ios

KROSF avatar Jan 25 '22 20:01 KROSF

I would actually recommend implementing the Flipper plugin on the JS Side, like @KROSF has already done. That's because the on value changed listeners are set up on the JS Side, and not on native.

So to have the MMKV instance(s) update in realtime in the Flipper Plugin View, we need to listen for value changes.

mrousavy avatar Jan 26 '22 08:01 mrousavy

@henrymoulton now support multiple instances

KROSF avatar Feb 23 '22 18:02 KROSF