zalmoxisus / mobx-remotedev

MobX DevTools extension
MIT License
327 stars 40 forks source link

Debugger logging numerous action type "┃ add" causes crash #24

Open justingosan opened 7 years ago

justingosan commented 7 years ago

Not sure if this is an issue in mobx, in RN or just in my code but here goes:

Basically I have a huge array of objects (with multiple properties) that I made observable in my Store. I do a single asynchronous fetch call which basically populates the variable.

When I plug mobx-remotedev in, the inspector logs multiple (seemingly infinite) "┃ add" action types for each property in each object of the array. This causes the remote debugger to hang and if i plug locally to "react-native-debugger", the app also hangs.

Is this normal behavior for mobx? If so how do I prevent the debugger from crashing? Thanks!

zalmoxisus commented 7 years ago

You can set onlyActions parameter to true so only mobx actions will be logged. The reason why the debugger is logging everything is that MobX isn't in strict mode. But that's odd you have so many add there.

kubk commented 5 years ago

I encountered the same problem. Enabling MobX's strict mode fixed the problem. Pretty sure this issue can be closed.