diff --git a/src/guide/migration/async-components.md b/src/guide/migration/async-components.md index 6a6b6fa4a8..20ccb4b482 100644 --- a/src/guide/migration/async-components.md +++ b/src/guide/migration/async-components.md @@ -30,7 +30,7 @@ const asyncPage = { } ``` -## Current Syntax +## 3.x Syntax Now, in Vue 3, since functional components are defined as pure functions, async components definitions need to be explicitly defined by wrapping it in a new `defineAsyncComponent` helper: @@ -52,7 +52,7 @@ const asyncPageWithOptions = defineAsyncComponent({ }) ``` -Another change that has been made from v2 is that the `component` option is now renamed to `loader` in order to accurately communicate that a component definition cannot be provided directly. +Another change that has been made from 2.x is that the `component` option is now renamed to `loader` in order to accurately communicate that a component definition cannot be provided directly. ```js{4} import { defineAsyncComponent } from 'vue' diff --git a/src/guide/migration/custom-directives.md b/src/guide/migration/custom-directives.md index cb8c815056..7e80d040e3 100644 --- a/src/guide/migration/custom-directives.md +++ b/src/guide/migration/custom-directives.md @@ -9,7 +9,7 @@ Here is a quick summary of what has changed: For more information, read on! -## Previous Syntax +## 2.x Syntax In Vue 2, custom directives were created by using the hooks listed below to target an element’s lifecycle, all of which are optional: @@ -35,7 +35,7 @@ Vue.directive('highlight', { Here, in the initial setup for this element, the directive binds a style by passing in a value, that can be updated to different values through the application. -## Current Syntax +## 3.x Syntax In Vue 3, however, we’ve created a more cohesive API for custom directives. As you can see, they differ greatly from our component lifecycle methods even though we’re hooking into similar events. We’ve now unified them like so: diff --git a/src/guide/migration/events-api.md b/src/guide/migration/events-api.md index bc3c89e3da..3d963a3df6 100644 --- a/src/guide/migration/events-api.md +++ b/src/guide/migration/events-api.md @@ -10,9 +10,9 @@ types: `$on`, `$off` and `$once` instance methods are removed. Vue instances no longer implement the event emitter interface. -## Previous Syntax +## 2.x Syntax -In v2, Vue instance could be used to trigger handlers attached imperatively via the event emitter API (`$on`, `$off` and `$once`). This was used to create _event hubs_ to create global event listeners used across the whole application: +In 2.x, Vue instance could be used to trigger handlers attached imperatively via the event emitter API (`$on`, `$off` and `$once`). This was used to create _event hubs_ to create global event listeners used across the whole application: ```js // eventHub.js diff --git a/src/guide/migration/fragments.md b/src/guide/migration/fragments.md index b6490ea95b..bd68409a7b 100644 --- a/src/guide/migration/fragments.md +++ b/src/guide/migration/fragments.md @@ -4,7 +4,7 @@ In Vue 3, components now have official support for multi-root node components, i.e., fragments! -## Previous Syntax +## 2.x Syntax In 2.x, multi-root components were not supported and would emit a warning when a user accidentally created one. As a result, many components are wrapped in a single `
` in order to fix this error. @@ -19,7 +19,7 @@ In 2.x, multi-root components were not supported and would emit a warning when a ``` -## Current Syntax +## 3.x Syntax In 3.x, components now can have multiple root nodes! However, this does require developers to explicitly define where attributes should be distributed. diff --git a/src/guide/migration/functional-components.md b/src/guide/migration/functional-components.md index 0da35ca96f..f9ddeea83b 100644 --- a/src/guide/migration/functional-components.md +++ b/src/guide/migration/functional-components.md @@ -4,7 +4,7 @@ In terms of what has changed, at a high level: -- Performance gains from v2 for functional components are now negligible in v3, so we recommend just using stateful components +- Performance gains from 2.x for functional components are now negligible in 3.x, so we recommend just using stateful components - Functional components can only be created using a plain function that receives `props` and `context` (i.e., `slots`, `attrs`, `emit`) - **DEPRECATED:** `functional` attribute on single-file component (SFC) `