Skip to content

Instantly share code, notes, and snippets.

@antonycourtney
Last active October 19, 2015 02:00
Show Gist options
  • Save antonycourtney/992612be1bfe1dbe17f2 to your computer and use it in GitHub Desktop.
Save antonycourtney/992612be1bfe1dbe17f2 to your computer and use it in GitHub Desktop.
An individual TODO list item as an Immutable Record
/**
* 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