I have a Store:
class Store {
user!: User;
constructor() {
makeObservable(this, {
user: observable,
setUser: action
});
}
setUser = (user: User | undefined) => this.user = user;
}
And I'm getting this error:
Error: [MobX] Cannot apply 'observable' to 'Store@user': Field not found.
User
is a custom object, should I treat him differently (observable wise)?
Thanks in advance!