MobX: Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed

Your login function is async and you need to use runInAction inside, or handle result in a separate action, or use some other way of handling async actions: import { runInAction, makeAutoObservable } from “mobx” class AuthStoreClass { authUser = null constructor() { makeAutoObservable(this) } login = async (params) => { const { data: { … Read more

Mobx-State-Tree – Assign to Array Type

The solution is to use cast: import { cast } from “mobx-state-tree” // ….. self.stores = cast(stores) This is because MST enables snapshots to be assigned to actual values, and automatically converts them. This doesn’t just apply to arrays, but to all types of values. However, typescript doesn’t have support for an assignment to be … Read more

Can’t call setState on a component that is not yet mounted

This warning that you are getting is because you are setting a reference to clickMe method in the constructor, which is then using the setState(). constructor (props) { super(props) this.state = { initial: ‘state’, some: ” } this.clickMe = this.clickMe.bind(this); <— This method } clickMe () { this.setState({ some: ‘new state’ <– the setState reference … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)