I discovered Mobx and everything is working perfect creating stores and working with this approach. However I' ve read that using redux devtools in the browser I am able to obtain visual info like if I were using Redux itself.
for instance I have:
import { observable, action } from "mobx";
import remotedev from "mobx-remotedev";
const createCounterStore = () => {
const store = observable( {
count: 0,
increment: action( () => {
store.count++;
} ),
reset: action( () => {
store.count = 0;
} ),
decrement: action( () => {
store.count--;
} )
} );
// Connect MobX store with the Redux DevTools Extension
remotedev( store, { name: "CounterStore" } );
};
const store = createCounterStore();
export default store;
but I 'm having those messages on the console:
# npm audit report
ws 5.0.0 - 5.2.2
Severity: moderate
ReDoS in Sec-Websocket-Protocol header - https://github.com/advisories/GHSA-6fc8-4gx4-v693
fix available via `npm audit fix`
node_modules/ws
socketcluster-client 0.9.3 - 0.9.9 || 11.1.0 - 14.2.2
Depends on vulnerable versions of ws
node_modules/socketcluster-client
remotedev >=0.2.8
Depends on vulnerable versions of socketcluster-client
node_modules/remotedev
and in the browser the app is not working.
If I remove everything that has to do with remotedev te app works ok
- Is there any way I can workaround this problem?.
- What is the solution that skilled Mobx users do in order to use redux devtools or Mobx is not used but Mobx-State-Tree?
I couldn t make it work on redux devtools with this version of mobx at least:
I just installed the mobx developer tools on my browser and when you click on the mobx tab and then on Record you can see how all is going. Besides, for not having the unknown action message you can place a name in the actions, like this:
and you will be able to see this on the browser:
Not as nice as redux devtools but if anyone knows about a better one just post it