Guys, rule of thumb, architecture === directory names. Performance is an implementation detail.
Frameworks live and die by their APIs. The easier it is to work with, to read and write and reason with, the better it is.
But you know what, this can be easily proved. Someone take a stab at todomvc with this and let me know if it hurt or not.
Looks pretty painful, but I do think adapting JSX could be a pretty painless solution so I don't look at it as a deal breaker. I am still yet to find a javascript templating solution that I don't have at least 1 or 2 issues with.
- I'm not sure why you're doing `return m("#todo-app"), [...]` on line 15 of the view, it looks like a typo
- I would probably have written a keyboard utility function similar to m.withAttr to keep the e.keyCode stuff out of the controller and remove the anonymous function in the view
- I generally prefer inline ternary syntax instead of a if statement at the top for the "clear" button.
- the pluralize snippet can also be pulled out into a utility method
- I also tend to favor this syntax: m("input#new-todo[placeholder='What needs to be done?']") if the value of the attribute is static (line 18)