Vue.js 2.6: New syntax for scoped slots released

Vue.js 2.6 is here and brings some new features. Part of this already points towards Vue.js 3, which should come in summer: The new syntax for scoped slots has been implemented. In addition, Vue is now five years old!

The new minor version Vue.js 2.6 has released some new features for the JavaScript framework. The Vue team follows the principle of semantic versioning – Breaking Changes is highlighted for Vue.js 3, which is expected to be released in the summer of this year. Nevertheless, one of the new features of Vue.js 2.6 already in the direction of Vue 3: scoped slots have got a new syntax. The new syntax combines normal and scoped slots under v-slots , as Evan You explains in the blog post about the release . As an example, you can enter the following code:

  <template v-slot:header>
  <template v-slot:item="{ data }">
    <h2>{{ data.title }}</h2>
    <p>{{ data.text }}</p>
  <template v-slot:footer>

Further information on the new features of slots can also be found in the RFC text . Through the RFC, the new syntax for slots, which will be fully implemented with Vue.js 3, was agreed with the community in January. Also, the two bug fix releases already released for Vue 2.6 have once again changed the slot syntax. Starting with Vue 2.6.2, normal slots that work with the new v-slots still have access to this.$slots . Overall, both types of slots from Vue.js 3 should be treated equally. This not only affects the new syntax but, as a result, the compiling behavior as well as the performance to be improved.

Vue.js 2.6 & Vue.js 3: News for the framework

Among other things, Vue.js 2.6 introduces error handling for asynchronous operations in lifecycle hooks and event handlers. For this purpose, the integrated error handler from Vue has got a function with which errors in v-on -Handlers are detected. Also new in Vue 2.6 is an ES Module Build, which can be used directly in the browser.

Vue.js 3, the upcoming major version of Vue.js, is due to be released this summer. Along the way, several new features can be discussed within the scope of RFCs , so that the community can co-decide on the details of the implementation. There is a separate repository on GitHub for the RFCs.

Vue.js 2.6 is named Macross. More information about the release can be found in the blog post for the release and the release notes.

Recent Articles

5 tips for effective remote pair programming

Home office is a challenge where people work and communicate closely together. Pair programming, i.e. working together on a source code, also lives from...

What are the Reasons You Should Play Online Bingo?

Online bingo is fast becoming popular among the masses. It uses unique bingo software to bring fun to you without you having to go somewhere to...

Most in-demand IT jobs from last decade

Uber for travel, Netflix for leisure and Google for everything is the ideal routine that we all wish to follow, of course with Instagram...

The finest text editor for professional bloggers

It is a fact that blogs have replaced books and magazines due to increasing popularity of the online world. Serious readers subscribe to blogs...

Angular 9 final release released

Angular 9 final is here! The new version was released a little late. Ivy is of course one of the new features, but that's...

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here