mobx-persist
mobx-persist copied to clipboard
Possible Unhandled Promise Rejection(id: 0): TypeError: No default value
This happens only in android without remote js debug.
Here is my store:
class UserStore {
@observable
token = null;
@observable
location = null;
@observable
mobile_number = null;
@action.bound
updateToken(token = "") {
this.token = token;
}
@action.bound
updateLocation(location) {
this.location = location;
}
@action.bound
updateMobileNumber(mobile_number) {
this.mobile_number = mobile_number;
}
}
class RootStore {
@persist("object")
@observable
userStore = new UserStore();
}
Here is hydrate call
hydrate("userStore", this.props.store, {
token: null,
location: null,
mobile_number: null
}).then(() => {
console.log("UserStore obtained");
});