muchobien / flipper-plugin-react-native-mmkv

Plugin to control react-native-mmkv from Flipper

Home Page:https://github.com/muchobien/flipper-plugin-react-native-mmkv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Able to track underlying database without connecting via JS?

henrymoulton opened this issue · 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/

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

but maybe there's another reason.

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

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.

@henrymoulton now support multiple instances