What is mobx
Estimated reading time: 1 minuteWhat is mobx?
mobX is a scalable state managemment system .
How use mobx
You can use mobx inside react project easily .
# npm
npm install mobx --save
npm install mobx-react --save
npm install babel-plugin-transform-decorators-legacy --save
# yarn
yarn add mobx
yarn add mobx-react
yarn add babel-plugin-transform-decorators-legacy
- project
.babelrc
add"plugins": ["transform-decorators-legacy"]
mobx import methods
import {observable, action, computed, autorun, extendObservable, toJS} from 'mobx'
mobx-react import methods
import {inject, observer } from 'mobx-react'