Debugging React Native #2745
Unanswered
Aleksandern
asked this question in
General
Replies: 2 comments
-
mobx-remotedev does work for me with Mobx 6. I had to use a custom function to get rid of const spy = require('mobx-remotedev/lib/spy').default;
export const addToDevtools = (store: object) => {
if (process.env.NODE_ENV !== 'production') {
spy(store, { global: true, name: store.constructor.name });
}
}; Usage: class Counter {
value = 0;
constructor() {
makeAutoObservable(this);
addToDevtools(this);
}
} But I agree Mobx lacks proper devtools support 😢 |
Beta Was this translation helpful? Give feedback.
0 replies
-
IIRC reactotron does supports MobX / spy events as well
…On Mon, Jan 25, 2021 at 9:34 AM kubk ***@***.***> wrote:
mobx-remotedev does work for me with Mobx 6. I had to use a custom
function to get rid remotedev decorator:
const spy = require('mobx-remotedev/lib/spy').default;
export const addToDevtools = (store: object) => {
if (process.env.NODE_ENV !== 'production') {
spy(store, { global: true, name: store.constructor.name });
}
};
Usage:
class Counter {
value = 0;
constructor() {
addToDevtools(this);
}
}
But I agree Mobx lacks proper devtools support 😢
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2745 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN4NBCT7DAKXKVYQ3PCDWDS3U3JRANCNFSM4WRCJG2A>
.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys,
Could somebody share your experience in debugging mobx state on react-native.
I use mobx-remotedev + react-native-debugger .
But mobx-remotedev doesn't support MobX 6 and has some issues with async actions.
Is there any alternative?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions