Top "Mobx" questions

Functional reactive programming library in JavaScript.

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

this is the first time I face this warning message. Can't call setState on a component that is not yet …

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

My context looks like this: class AuthStoreClass { authUser = null constructor() { makeAutoObservable(this) } login = async (params) => { const { data: { data: authUser } } = …

reactjs mobx mobx-react mobx-react-lite
How to inject mobx store into a stateless component

I am using mobx and react in a web application and I want to find a way to pass mobx …

javascript reactjs mobx mobx-react
How to connect state to props with mobx.js @observer when use ES6 class?

Let's take a class like this in an app with React and React Router. @observer class Module1 extends React.Component { …

javascript reactjs mobx
using mobx with react functional components and without decorators

I'm trying to get MobX to work with functional components in react. I want to do this without having to …

reactjs mobx mobx-react
Correct way of Creating multiple stores with mobx and injecting it into to a Component - ReactJs

As suggested here in the Mobx documentation I have created multiple stores in the following manner: class bankAccountStore { constructor(rootStore){ …

reactjs mobx mobx-react state-management
Mobx: Observable array does not display correctly

I am trying to understand how to use observable array with Mobx. I have a hard time to figure out …

javascript arrays mobx
mobx - Leading decorators must be attached to a class declaration

I want to use the MobX decorators, but when I try to run my code, I get the following error …

reactjs electron mobx
React Hooks (useState) and Mobx [No mobx-react-lite]

in my react application (with typescript) I want to use React hooks (specifically useState) to manage the form state and …

reactjs mobx mobx-react react-hooks react-tsx
How to get MobX Decorators to work with Create-React-App v2?

Support for the experimental syntax 'decorators-legacy' isn't currently enabled I tried adding the decorators-legacy babel plugin and @babel/plugin-proposal-decorators with { …

reactjs decorator babeljs create-react-app mobx