Last active
July 27, 2017 09:46
-
-
Save mweststrate/b2d208f1e881211f2b15becd51568358 to your computer and use it in GitHub Desktop.
This file contains 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 { types } from 'mobx-state-tree' | |
export const Todo = types.model( | |
'Todo', | |
{ | |
title: types.string, | |
finished: false, | |
}, | |
{ | |
toggle() { | |
this.finished = !this.finished | |
}, | |
}, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment