Vue framework speeds template parsing, improves reactivity

Upgraded JavaScript framework features a rewritten template parser that is ‘2x faster’ and a refactored reactivity system that increases effect triggering accuracy.

shutterstock 1559577011 JavaScript web application lines of code including Vue routes
Yurich / Shutterstock

Vue 3.4 has been released. The upgrade to the JavaScript front-end framework features a faster, rewritten template parser and a refactored reactivity system.

Announced December 28, 2023, Vue 3.4 promises “substantial internal improvements.” Most notable is the rewritten template parser, which uses a state-machine tokenizer in htmlparser2 that iterates through the entire template string just once. The result is a parser twice as fast for templates of all sizes, Vue creator Evan You wrote in the blog post announcing the release. Along with the parser, SFC build performance has been improved.

Also featured in Vue 3.4 is a substantial refactor of the reactivity system, with a goal of re-compute efficiency of computed properties. The release also stabilizes defineModel, a new <script setup> macro intended to simplify the implementation of components that support the v-model. Other features in Vue.js 3.4 include improved hydration mismatch error messages, the addition of a production error reference page to Vue documentation, and the removal of deprecated features such as the global JSX namespace and Reactivity Transform.

Vue is billed as a progressive, incrementally adaptable JavaScript framework for building user interfaces on the web. Vue 2.0, released in 2016, reached end of life on December 31, 2023.

Copyright © 2024 IDG Communications, Inc.