Skip to content

Instantly share code, notes, and snippets.

@Joe1220
Last active November 24, 2018 04:32
Show Gist options
  • Save Joe1220/5b8d1873a4e42bf9de9c57001cb6b75b to your computer and use it in GitHub Desktop.
Save Joe1220/5b8d1873a4e42bf9de9c57001cb6b75b to your computer and use it in GitHub Desktop.
import { observable, action } from 'mobx'
class TestStore {
@observable userList
constructor() {
this.userList = []
}
@action.bound
addUser(newUser) {
this.userList.push(newUser)
}
}
export default TestStore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment