What are the design goals of Vue3.0? What optimizations have been made?

 

 

1. Design goals

Updates that do not solve the actual business pain points are hooligans. Let’s list Vue3the problems we may face before

  • Code for complex components becomes harder to maintain as functionality grows

  • Lack of a "clean" mechanism for extracting and reusing logic across multiple components

  • Type inference is not friendly enough

  • bundletoo long

And Vue3after two or three years of preparation, what did you do?

We deduce from the result

  • smaller
  • faster
  • TypeScript support
  • API design consistency
  • Improve self-maintainability
  • Open up more underlying functions

In a word, it is smaller, faster and more friendly

smaller

Vue3Remove some unusedAPI

Introduced tree-shaking, you can "clip" useless modules, and only package what you need, making the overall volume of the package smaller

faster

Mainly reflected in the compilation:

  • diff algorithm optimization
  • static boost
  • event listener cache
  • SSR optimization

In the next article we will introduce more

more friendly

vue3in vue2bothoptions API

Supongo que te gusta

Origin blog.csdn.net/mo3408/article/details/131780944
Recomendado
Clasificación