mobx-react-devtools icon indicating copy to clipboard operation
mobx-react-devtools copied to clipboard

Ability to use devtools in React Native or other hybrid / desktop apps

Open tlvenn opened this issue 8 years ago • 10 comments

Hi,

Similarly to https://github.com/zalmoxisus/remote-redux-devtools, it would be awesome if the devtools could be used in other context than the browser such as React Native (my use case) or other hybrid / desktop apps.

tlvenn avatar May 16 '16 00:05 tlvenn

While waiting for it remember that you can can easily use mobx.spy to intercept and log actions (and all the other stuff too) since 2.2.0.
For example this might be better then nothing I guess 🍂

mmazzarolo avatar May 30 '16 13:05 mmazzarolo

Good point, thanks for the gist @mmazzarolo !

tlvenn avatar May 31 '16 01:05 tlvenn

Any body interested in building one? I think this is the core of the thing: https://github.com/mobxjs/mobx-react-devtools/blob/master/src/changeLogger.js. Not sure whether all debug utilities in the mobx-react package are already exposed on native, but that can be fixed easily :)

mweststrate avatar May 31 '16 09:05 mweststrate

@mweststrate Been thinking about this myself a bunch, any tips on digging into this?

corymsmith avatar Jul 05 '16 21:07 corymsmith

@corymsmith basically you only need the spy api from mobx, and the trackComponents and renderReporter from the mobx-react package. You can directly reuse the logger functionality from mobx-react-devtools I think

mweststrate avatar Jul 14 '16 21:07 mweststrate

I am not sure the timing feature is bound to MobX. It would be great to have this as a standalone React DevTools so that even Redux project can use it.

mocheng avatar Jul 22 '16 02:07 mocheng

@mocheng I think I saw a similar but general project in the past, it was published by Netflix I think. The current implementation doesn't use the internal react performance api, but keeps its own administratino.

mweststrate avatar Jul 24 '16 13:07 mweststrate

i'm no RN expert, but this might also work for RN? https://github.com/zalmoxisus/mobx-remotedev/

mweststrate avatar Jul 24 '16 13:07 mweststrate

+1

plusmancn avatar Feb 06 '17 10:02 plusmancn

@mweststrate, I can confirm that mobx-remotedev works with React Native via react-native-debugger. Just decorate the stores with @remotedev, turn Remote Debugging on in the App and you're good to go. The updates appear in the Redux Devtools section of the debugger.

olieidel avatar Jul 15 '17 17:07 olieidel