New features of vue3.0: 1. Node tag; 2. Event caching; 3. Responsive Proxy; 4. Composition API; 5. Three new components: Fragment, Teleport (portal) and Suspense; 6. Tree Shaking and so on.
The operating environment of this tutorial: windows10 system, vue3.0 version, Dell G3 computer.
New features of Vue3.0
##1. Node tag
Static Node<span>value</span>Dynamic Node
<span>{{value}}</span>patchFlagThe bottom layer of vue3.0 will automatically identify whether a node is dynamic. If it is dynamic, it will automatically generate an identification (different dynamics will have Corresponding to different identifiers, such as the dynamics of the content text, or the dynamics of the id), each time the DOM is updated, the static nodes are directly skipped and the dynamic nodes are directly positioned, which greatly saves efficiency.
2. Event caching
3. Responsive Proxy
Proxy(vue3.0) vs Object.defineProperty (vue2.0) 1. Vue2.0 responsive principle- The responsive process needs to traverse data, props, etc., which consumes a lot of money
- Does not support Set/Map , class, array and other types
- Newly added or deleted attributes cannot be monitored
- Array responsiveness requires additional implementation
- The corresponding modification syntax is limited
4. Composition API
Don’t use Composition for the sake of Composition
Improves the quality of the code upper limit, but it also lowers the lower limit is positioned as an advanced feature because the problems it is designed to solve mainly arise in large applications. We are not planning to overhaul the documentation to use this as the default scheme. Related recommendations: "vue.js Tutorial"
5. Teleport
Modal, Dialog, Select, Dropdown...##6. Fragments
The template does not need to be wrapped with a p, that is, there is no need to have only one root node. Multiple labels (nodes) can be paralleled
7. Custom Renderer API (createRenderer)
- NativeScript Vue integration underway by @rigor789
- Users already experimenting w/ WebGL custom renderer that can be used alongside a normal Vue application (Vugel)
- WEEX, Vue Native, applet...
8. Tree ShakingLoading on demand
Except for retaining some necessary parts such as Virtual DOM update algorithm and responsive system, others are loaded on demand such as v-model, etc.
9. Suspense
- Wait on nested async dependencies in a nested tree
- Works with async setup()
- Works with Aysnc Components
- You can load components asynchronously, and the entire DOM will be in memory in advance Virtual rendering is performed in the UI. At this time, it will wait for asynchronous component rendering. After all components are rendered, it will be rendered to the interface DOM.
10. Better TypeScript Support
##Codebase written in TS w/ auto-generated type definitions- API is the same in JS and TS
-
In fact, code will also be largely the same
- Class component is still supported
- ##11. Stepping into pitfalls
Event
- The root node is automatically mounted by default and xxx.native event is discarded
-
inheritAttrs: false (class, style, events, css scope)
- The settings are not mounted to the root node by default, but this will result in classes etc. not being mounted to the root node
-
props
Set the event attribute declaration in the component.
New emits configuration
-
Slot
- watch
##In vue3.0, you can configure flush: " sync" to make the functions in the watch and the monitored element value changes at the same time, and no longer execute after the component is updated.
- v-model & .sync
-
##JSX / TSX - 1、@ant- design-vue / jsxIt used to be that some properties needed to be passed through objects. Now that properties are newly defined, you can pass them directly
programming video# #For more programming-related knowledge, please visit:
! !
The above is the detailed content of What are the new features of vue3.0. For more information, please follow other related articles on the PHP Chinese website!

PHP8.3发布:新特性一览随着技术的不断发展和需求的不断变化,编程语言也在不断更新和改进。作为一种广泛应用于网络开发的脚本语言,PHP一直在不断进步,为开发者提供更强大和高效的工具。最近发布的PHP8.3版本带来了许多期待已久的新特性和改进,下面让我们来看一下这些新特性的一览。非空属性的初始化在过去的PHP版本中,如果一个类的属性没有被明确赋值,它的值

深入解析PHP8的新特性,助您掌握最新技术随着时间的推移,PHP编程语言一直在不断演进和改进。最近发布的PHP8版本为开发者提供了许多令人兴奋的新特性和改进,为我们的开发工作带来了更多便利和效率。在本文中,我们将深入解析PHP8的新特性,并提供具体的代码示例,旨在帮助您更好地掌握这些最新的技术。JIT编译器PHP8引入了JIT(Just-In-Time)编

PHP8.1引入的新的Redis扩展随着互联网的快速发展,大量的数据需要进行存储和处理。为了提高数据处理的效率和性能,缓存成为了一个不可或缺的部分。而在PHP开发中,Redis作为一种高性能的键值对存储系统,被广泛应用于缓存和数据存储的场景。为了进一步提升Redis在PHP中的使用体验,PHP8.1引入了新的Redis扩展,本文将介绍这一扩展的新增功能,并给

php8新特性有JIT 编译器、类型推导、命名参数、联合类型、属性、错误处理改进、异步编程支持、新的标准库函数和匿名类的扩展等。详细介绍:1、JIT编译器,PHP8引入了JIT编译器,这是一个重要的性能改进,JIT编译器可以对一些高频执行的代码进行实时编译和优化,从而提高运行速度;2、类型推导,PHP8引入了类型推导功能,允许开发者在声明变量时自动推导出变量的类型等等。

CSS3的新特性一览:如何使用CSS3实现过渡效果CSS3作为CSS的最新版本,在众多新特性中,最有趣和实用的应该是过渡效果(transition)。过渡效果可以让我们的页面在交互时更加平滑、漂亮,给用户带来良好的视觉体验。本文将介绍CSS3过渡效果的基本用法,并附带相应的代码示例。transition-property属性:指定需要过渡的CSS属性过渡效果

go语言的新特性有:1、Go模块,用于管理Go语言项目的依赖关系;2、错误处理,增加了一个新的错误类型error,使得错误处理更加灵活和简洁;3、上下文包,用于在goroutine之间传递请求范围的值;4、嵌入,即一个结构体可以嵌入到另一个结构体中;5、同步包,更好地控制goroutine之间的同步和通信;6、错误值,更好地区分不同类型的错误;7、泛型,让开发者编写更灵活。

CSS3的新特性一览:如何使用CSS3实现水平居中布局在网页设计和布局中,水平居中布局是一项常见的需求。过去,我们经常使用复杂的JavaScript或CSS技巧实现此目的。然而,CSS3引入了一些新的特性,使得水平居中布局更加简单和灵活。本文将介绍一些CSS3的新特性,并提供一些代码示例,演示如何使用CSS3实现水平居中布局。一、使用flexbox布局fle

PHP8作为最新版本的PHP编程语言,引入了许多新的特性和改进,在底层开发原理方面做了一些重要的改变。本文将深入探讨PHP8的底层开发原理,并分析如何利用新特性提高代码性能和可靠性。首先,我们来了解一下PHP8的一些重要的底层开发原理。PHP8引入了JIT(Just-In-Time)编译器,这是一个动态编译器,可以将PHP代码即时转换为本地机器码,并在执行时


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver Mac version
Visual web development tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Linux new version
SublimeText3 Linux latest version

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function