knockout v3.4.0 Release NotesRelease Date: 2015-11-17 // almost 7 years ago
🆕 New features and bug fixes
- 👌 Improves performance of components, templates, computeds, and observables.
- 📚 Includes a native version of deferred updates, along with a microtask queue (
- Calls a
ko.onErrorhandler, if defined, for errors from asynchronous code.
ko.options.useOnlyNativeEventscan be set to tell Knockout to use only native (not jQuery) events.
🚀 The 3.4.0 RC release notes has the full list of issues and pull requests included in this release. The final release fixes two regression bugs found in the RC:
- 🚚 #1903 - New
beforeRemovebehavior can break retained items.
- #1905 - Endless recursion possible with
Possible compatibility issues
⚡️ 1. Components now use microtasks to perform updates asynchronously instead of
setTimeout. Since microtasks are run before the browser repaints the page, all loaded components will be initialized and displayed in a single repaint. Although this reduces the overall time needed to display components, it could result in a longer delay before anything is displayed. ⚡️ 2. The new, native deferred updates feature has a slightly different API and is implemented differently than the Deferred Updates plugin. Migrating from the plugin will generally require some code changes (full details to come soon).
ko.computedno longer use a closure when defining their methods, such as
valueHasMutated. These functions expect
thisto be set correctly and so can't be used directly as a callback. Instead you'll need to use
bind, such as