Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { observable, action } from 'mobx-miniprogram'
- export const store = observable({
- // state
- counter: 0,
- // actions
- increment: action(function () {
- this.counter++
- }),
- decrement: action(function () {
- this.counter--
- })
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement