Skip to content

Commit 28e28b6

Browse files
committed
remove bad usage of 'deprecated' in vue router migration guide
1 parent a06e547 commit 28e28b6

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

src/guide/migration-vue-router.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ order: 26
88
99
## Router Initialization
1010

11-
### `router.start` <sup>deprecated</sup>
11+
### `router.start` <sup>replaced</sup>
1212

1313
There is no longer a special API to initialize an app with Vue Router. That means instead of:
1414

@@ -47,7 +47,7 @@ new Vue({
4747

4848
## Route Definitions
4949

50-
### `router.map` <sup>deprecated</sup>
50+
### `router.map` <sup>replaced</sup>
5151

5252
Routes are now defined as an array on a [`routes` option](http://router.vuejs.org/en/essentials/getting-started.html#javascript) at router instantiation. So these routes for example:
5353

@@ -82,7 +82,7 @@ The array syntax allows more predictable route matching, since iterating over an
8282
</div>
8383
{% endraw %}
8484

85-
### `router.on` <sup>deprecated</sup>
85+
### `router.on` <sup>removed</sup>
8686

8787
If you need to programmatically generate routes when starting up your app, you can do so by dynamically pushing definitions to a routes array. For example:
8888

@@ -128,7 +128,7 @@ router.match = createMatcher(
128128
</div>
129129
{% endraw %}
130130

131-
### `subRoutes` <sup>deprecated</sup>
131+
### `subRoutes` <sup>renamed</sup>
132132

133133
[Renamed to `children`](http://router.vuejs.org/en/essentials/nested-routes.html) for consistency within Vue and with other routing libraries.
134134

@@ -139,7 +139,7 @@ router.match = createMatcher(
139139
</div>
140140
{% endraw %}
141141

142-
### `router.redirect` <sup>deprecated</sup>
142+
### `router.redirect` <sup>replaced</sup>
143143

144144
This is now an [option on route definitions](http://router.vuejs.org/en/essentials/redirect-and-alias.html). So for example, you will update:
145145

@@ -165,7 +165,7 @@ to a definition like below in your `routes` configuration:
165165
</div>
166166
{% endraw %}
167167

168-
### `router.alias` <sup>deprecated</sup>
168+
### `router.alias` <sup>replaced</sup>
169169

170170
This is now an [option on the definition for the route](http://router.vuejs.org/en/essentials/redirect-and-alias.html) you'd like to alias to. So for example, you will update:
171171

@@ -198,7 +198,7 @@ alias: ['/manage', '/administer', '/administrate']
198198
</div>
199199
{% endraw %}
200200

201-
### Arbitrary Route Properties
201+
### Arbitrary Route Properties <sup>replaced</sup>
202202

203203
Arbitrary route properties must now be scoped under the new meta property, to avoid conflicts with future features. So for example, if you had defined:
204204

@@ -240,20 +240,20 @@ if (route.meta.requiresAuth) {
240240

241241
Route matching now uses [path-to-regexp](https://github.com/pillarjs/path-to-regexp) under the hood, making it much more flexible than previously.
242242

243-
### One or More Named Parameters
243+
### One or More Named Parameters <sup>changed</sup>
244244

245245
The syntax has changed slightly, so `/category/*tags` for example, should be updated to `/category/:tags+`.
246246

247247
{% raw %}
248248
<div class="upgrade-path">
249249
<h4>Upgrade Path</h4>
250-
<p>Run the <a href="https://github.com/vuejs/vue-migration-helper">migration helper</a> on your codebase to find examples of the deprecated route syntax.</p>
250+
<p>Run the <a href="https://github.com/vuejs/vue-migration-helper">migration helper</a> on your codebase to find examples of the obsolete route syntax.</p>
251251
</div>
252252
{% endraw %}
253253

254254
## Links
255255

256-
### `v-link` <sup>deprecated</sup>
256+
### `v-link` <sup>replaced</sup>
257257

258258
The `v-link` directive has been replaced with a new [`<router-link>` component](http://router.vuejs.org/en/api/router-link.html), as this sort of job is now solely the responsibility of components in Vue 2. That means whenever wherever you have a link like this:
259259

@@ -276,9 +276,9 @@ Note that `target="_blank"` is not supported on `<router-link>`, so if you need
276276
</div>
277277
{% endraw %}
278278

279-
### `v-link-active` <sup>deprecated</sup>
279+
### `v-link-active` <sup>replaced</sup>
280280

281-
The `v-link-active` directive has also been deprecated in favor of specifying a separate tag on [the `<router-link>` component](http://router.vuejs.org/en/api/router-link.html). So for example, you'll update this:
281+
The `v-link-active` directive has also been replaced by the `tag` attribute on [the `<router-link>` component](http://router.vuejs.org/en/api/router-link.html). So for example, you'll update this:
282282

283283
``` html
284284
<li v-link-active>
@@ -305,7 +305,7 @@ The `<a>` will be the actual link (and will get the correct href), but the activ
305305

306306
## Programmatic Navigation
307307

308-
### `router.go`
308+
### `router.go` <sup>changed</sup>
309309

310310
For consistency with the [HTML5 History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API), `router.go` is now only used for [back/forward navigation](https://router.vuejs.org/en/essentials/navigation.html#routergon), while [`router.push`](http://router.vuejs.org/en/essentials/navigation.html#routerpushlocation) is used to navigate to a specific page.
311311

@@ -318,7 +318,7 @@ For consistency with the [HTML5 History API](https://developer.mozilla.org/en-US
318318

319319
## Router Options: Modes
320320

321-
### `hashbang: false` <sup>deprecated</sup>
321+
### `hashbang: false` <sup>removed</sup>
322322

323323
Hashbangs are no longer required for Google to crawl a URL, so they are no longer the default (or even an option) for the hash strategy.
324324

@@ -329,7 +329,7 @@ Hashbangs are no longer required for Google to crawl a URL, so they are no longe
329329
</div>
330330
{% endraw %}
331331

332-
### `history: true` <sup>deprecated</sup>
332+
### `history: true` <sup>replaced</sup>
333333

334334
All routing mode options have been condensed into a single [`mode` option](http://router.vuejs.org/en/api/options.html#mode). Update:
335335

@@ -354,7 +354,7 @@ var router = new VueRouter({
354354
</div>
355355
{% endraw %}
356356

357-
### `abstract: true` <sup>deprecated</sup>
357+
### `abstract: true` <sup>replaced</sup>
358358

359359
All routing mode options have been condensed into a single [`mode` option](http://router.vuejs.org/en/api/options.html#mode). Update:
360360

@@ -381,7 +381,7 @@ var router = new VueRouter({
381381

382382
## Route Options: Misc
383383

384-
### `saveScrollPosition` <sup>deprecated</sup>
384+
### `saveScrollPosition` <sup>replaced</sup>
385385

386386
This has been replaced with a [`scrollBehavior` option](http://router.vuejs.org/en/advanced/scroll-behavior.html) that accepts a function, so that the scroll behavior is completely customizable - even per route. This opens many new possibilities, but to simply replicate the old behavior of:
387387

@@ -404,7 +404,7 @@ scrollBehavior: function (to, from, savedPosition) {
404404
</div>
405405
{% endraw %}
406406

407-
### `root` <sup>deprecated</sup>
407+
### `root` <sup>renamed</sup>
408408

409409
Renamed to `base` for consistency with [the HTML `<base>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base).
410410

@@ -415,7 +415,7 @@ Renamed to `base` for consistency with [the HTML `<base>` element](https://devel
415415
</div>
416416
{% endraw %}
417417

418-
### `transitionOnLoad` <sup>deprecated</sup>
418+
### `transitionOnLoad` <sup>removed</sup>
419419

420420
This option is no longer necessary now that Vue's transition system has explicit [`appear` transition control](transitions.html#Transitions-on-Initial-Render).
421421

@@ -426,7 +426,7 @@ This option is no longer necessary now that Vue's transition system has explicit
426426
</div>
427427
{% endraw %}
428428

429-
### `suppressTransitionError` <sup>deprecated</sup>
429+
### `suppressTransitionError` <sup>removed</sup>
430430

431431
Removed due to hooks simplification. If you really must suppress transition errors, you can use [`try`...`catch`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) instead.
432432

@@ -439,7 +439,7 @@ Removed due to hooks simplification. If you really must suppress transition erro
439439

440440
## Route Hooks
441441

442-
### `activate` <sup>deprecated</sup>
442+
### `activate` <sup>replaced</sup>
443443

444444
Use [`beforeRouteEnter`](http://router.vuejs.org/en/advanced/navigation-guards.html#incomponent-guards) in the component instead.
445445

@@ -450,7 +450,7 @@ Use [`beforeRouteEnter`](http://router.vuejs.org/en/advanced/navigation-guards.h
450450
</div>
451451
{% endraw %}
452452

453-
### `canActivate` <sup>deprecated</sup>
453+
### `canActivate` <sup>replaced</sup>
454454

455455
Use [`beforeEnter`](http://router.vuejs.org/en/advanced/navigation-guards.html#perroute-guard) in the route instead.
456456

@@ -461,7 +461,7 @@ Use [`beforeEnter`](http://router.vuejs.org/en/advanced/navigation-guards.html#p
461461
</div>
462462
{% endraw %}
463463

464-
### `deactivate` <sup>deprecated</sup>
464+
### `deactivate` <sup>removed</sup>
465465

466466
Use the component's [`beforeDestroy`](/api/#beforeDestroy) or [`destroyed`](/api/#destroyed) hooks instead.
467467

@@ -472,7 +472,7 @@ Use the component's [`beforeDestroy`](/api/#beforeDestroy) or [`destroyed`](/api
472472
</div>
473473
{% endraw %}
474474

475-
### `canDeactivate` <sup>deprecated</sup>
475+
### `canDeactivate` <sup>replaced</sup>
476476

477477
Use [`beforeRouteLeave`](http://router.vuejs.org/en/advanced/navigation-guards.html#incomponent-guards) in the component instead.
478478

@@ -483,7 +483,7 @@ Use [`beforeRouteLeave`](http://router.vuejs.org/en/advanced/navigation-guards.h
483483
</div>
484484
{% endraw %}
485485

486-
### `canReuse: false` <sup>deprecated</sup>
486+
### `canReuse: false` <sup>removed</sup>
487487

488488
There's no longer a use case for this in the new Vue Router.
489489

@@ -494,9 +494,9 @@ There's no longer a use case for this in the new Vue Router.
494494
</div>
495495
{% endraw %}
496496

497-
### `data` <sup>deprecated</sup>
497+
### `data` <sup>replaced</sup>
498498

499-
The `$route` property is reactive, so you can just use a watcher to react to route changes, like this:
499+
The `$route` property is now reactive, so you can just use a watcher to react to route changes, like this:
500500

501501
``` js
502502
watch: {
@@ -516,7 +516,7 @@ methods: {
516516
</div>
517517
{% endraw %}
518518

519-
### `$loadingRouteData` <sup>deprecated</sup>
519+
### `$loadingRouteData` <sup>removed</sup>
520520

521521
Define your own property (e.g. `isLoading`), then update the loading state in a watcher on the route. For example, if fetching data with [axios](https://github.com/mzabriskie/axios):
522522

0 commit comments

Comments
 (0)