[Sophomore Upper][Vue3]Basic overview of Vue3

1. Vue3 can (whether it can be added or not) have no root tag, that is to say, it does not need to be placed in <div>

 2. What is vite? 

A new generation of front-end build tools

advantage:

        1) In the development environment, no packaging operation is required, and it can be cold started quickly

        2) Lightweight and fast hot reload

        3) Real on-demand compilation, no longer waiting for the entire application to be compiled

3. When Vue2 and Vue3 configurations conflict, display Vue3

4. The data, methods, etc. used in the components in Vue3 must be configured in the setup. 

5. Two return values ​​of the setup function:

                1. If an object is returned, the properties and methods in the object must be configured in the setup in the template

                2. If a rendering function is returned: you can customize the rendering content (this only needs to be understood)

6. 

RefImpl where Ref is the meaning of reference reference

                           Impl is the meaning of implement implementation

 

In VUE3, turning data into responsive requires the help of the ref function

                                        After the data is processed by ref, it becomes an instance object of reference implementation (abbreviated as reference object)

                

7. The proxy proxy object is used in VUE3 to process object-type data in response mode. It is in ES6 and comes with window, not a library.

8. Data hijacking is the foundation of responsiveness

9. Template strings

First: (inside the red frame)

Second: backticks are also template strings

10. The options API in Vue2 is called configuration API

        Composition API in Vue3 is called combined API

Guess you like

Origin blog.csdn.net/IDApprentice/article/details/126591822