Last active
November 24, 2018 04:32
-
-
Save Joe1220/5b8d1873a4e42bf9de9c57001cb6b75b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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