Advanced TypeScript Programming Projects
上QQ阅读APP看书,第一时间看更新

Simplify updating values with binding

One feature of many modern frameworks is the use of binding to remove the need to manually update inputs or trigger events. The idea behind using a binding is that the framework establishes a connection between a UI element and the code, such as a property, watches for changes to the underlying values, and then triggers updates when it detects a change. When done correctly, this removes a lot of drudgery from writing our code and, more importantly, helps to reduce errors.