Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. import { observable, action } from 'mobx-miniprogram'
  2.  
  3. export const store = observable({
  4. // state
  5. counter: 0,
  6.  
  7. // actions
  8. increment: action(function () {
  9. this.counter++
  10. }),
  11. decrement: action(function () {
  12. this.counter--
  13. })
  14. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement