The official version of Vue 3 will release in Q3 2020. It is currently in the release candidate stage that means that the APIs, core, structures are stable and able to become a production release unless significant bugs emerge. Therefore, it’s an appropriate time to figure out which programming differences between Vue 3 and Vue 2 and make the necessary adaptation.

Vue 3 does not change absolutely with Vue 2 but when completed rewriting it from Vue 2, some expected upgrades turn into a reality. The expected means that it makes our application smaller, faster, and more powerful.

This article is for those who have experience with Vue 2.

The Essentials

Creating App

Firstly, looking at the way to create an app, you will see the difference in syntax. Not only syntax but also essence is changed.

Reason for change

  • Global configurations make issues during testing in unit tests because test cases can affect each other by global configuration. All of those effects are pollution.
  • Vue 3 provides different global configurations but it makes it difficult to share a copy of configuration to multiple apps.

Multiple Root

In Vue 2, you implement only one single root node in the template but Vue 3 no longer requires a single root node for components that means it provides developer multiple root in the template.

Image for post

In Vue 3, you can replace the setup() method by some following options:

  • Components
  • Props
  • Data
  • Methods
  • Computed Properties
  • Lifecycle methods

#javascript #vue-3 #web-development #vuejs #programming

Differences Between Vue 2 And Vue 3
292.40 GEEK