Last active
October 19, 2015 02:00
-
-
Save antonycourtney/992612be1bfe1dbe17f2 to your computer and use it in GitHub Desktop.
An individual TODO list item as an Immutable Record
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
/** | |
* todoItem.js - An individual item in the TODO list as an Immutable record | |
*/ | |
export default class TodoItem extends Immutable.Record({ | |
id: '', | |
complete: false, | |
text: '' | |
}) { | |
constructor(text,complete = false) { | |
super({id: genID(), text, complete}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment