so mobx 6 is out and i am trying to implement a basic store like that :
export class AuthStore {
rootStore
value
constructor(rootStore) {
makeObservable(this, {
value:observable
})
this.rootStore = rootStore
}
}
and
class RootStore {
constructor () {
this.authStore = new AuthStore(this)
}
}
const stores = new RootStore()
and i am getting an error : Cannot decorate undefined property: 'value'
but if i will take the AuthStore outside the RootStore
const authStore = new AuthStore()
every thing working fine .. i tried to read more then once the mobx 6t docs but there is nothing about it
would like to know what i am doing wrong ! thanks !