I checked the vanilla js TodoMVC... and I don't like it. Too much code for problems solved hundreds of times. Take for example the template:
function Template() { this.defaultTemplate = '<li data-id="{{id}}" class="{{completed}}">' + '<div class="view">' + '<input class="toggle" type="checkbox" {{checked}}>' + '<label>{{title}}</label>' + '<button class="destroy"></button>' + '</div>' + '</li>'; }
And then using string operations the app is replacing values:
template = template.replace('{{id}}', data[i].id); template = template.replace('{{title}}', escape(data[i].title));
So much code... and the more you write the more bugs you may have... this is exactly what we all are trying to avoid - reinventing the wheel again and again.
Tadaaaa !!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I checked the vanilla js TodoMVC... and I don't like it. Too much code for problems solved hundreds of times. Take for example the template:
And then using string operations the app is replacing values:
So much code... and the more you write the more bugs you may have... this is exactly what we all are trying to avoid - reinventing the wheel again and again.
Tadaaaa !!