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

The connection to _next/webpack-hmr was interrupted while the page was loading

As per the resolution suggested in https://github.com/zeit/next.js/issues/9776, You can unregister the service worker if you are using CRA. The following code shows the way to remove registered service worker: import { unregister } from ‘./serviceWorker’ // … unregister(); If you have already deployed the registered one, first you to need build this code and deploy … 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)