Knockout.js is a good framework for building single page applications. But, it has a few drawbacks. But before going over the drawbacks, we will discuss the problem that it solves.
Too many View Models
With Knockout.js, we create a View Model. Then bind the View Model to the HTML elements. Whenever the data within the View Model changes, the framework updates the view or HTML elements. Event handlers update the data within the View Model.
One of the big drawbacks of using Knockout.js is the proliferation of View Models. Some web applications do not have a consistent way of representing data. This causes the number of View Models to increase dramatically.
Another drawback of Knockout.JS is the learning curve. At the outset, there is not much. We decorate HTML with data-bind attributes. And we define our property as observables. But sometimes, all of this becomes hard to debug.
Though the data-bind attribute is all we do to decorate, we have to learn the syntax behind the expression.
There are <span data-bind="text: myItems().length"></span> items
<button data-bind="enable: myItems().length < 5">Add</button>