I have this bit of code based on what I can tell from the TODOMVC is the right way to define state
export default class Entry extends Model {
default = {
name: 'test_name'
}
}
export default class Home extends Component {
constructor(props) { // componentWillMount
super(props);
}
state = {
entries: Entry.Collection,
}
In the console when debugging (eg in render or in constructor) I notice this.state.entries.add does not exist. this.state.entries.create().add is defined. What would be the proper way to add something to the entries collection? Should I declare
state = {
entries: Entry.Collection.create()
}
instead?