I don't know much about how to architect JavaScript applications, but I am struck by how much of this stuff seems to be glued together by strings. For example, from footer.js (https://github.com/box/t3js/blob/master/examples/todo/js/mod...)
switch(name) {
case 'todoadded':
case 'todoremoved':
case 'todostatuschange':
this.updateTodoCounts();
break;
case 'statechanged':
this.updateSelectedFilterByUrl(data.url);
break;
}
Accidentally wrote 'todostatuschanged' instead of 'todostatuschange' (in keeping with the tense of all the other actions!) and you'll get a silent failure.Or from isListCompleted() in the list module:
moduleEl.querySelectorAll('#todo-list li input[type="checkbox"]')
I'm not picking on T3, since all JavaScript frameworks seem to have this problem. There has to be a better way than that!