React Mobx - Store Return Proxy Object
I have the following state class: import { observable, action } from 'mobx'; import axios from 'axios'; export default class AppState { @observable user; @observable pToken;
Solution 1:
Everything is working as intended, MobX v5 relies on proxies under the hood so when you log observable objects it usually shows some internal implementation.
You can use toJS MobX method console.log(toJS(user))
or just destructure user object console.log({ ...user })
toJS
docs: https://mobx.js.org/refguide/tojson.html
Post a Comment for "React Mobx - Store Return Proxy Object"