From fbc85ebbc0d92a11f6457fd3808cc0ae072bfd12 Mon Sep 17 00:00:00 2001 From: Naoki Endoh Date: Sun, 2 May 2021 22:02:42 +0900 Subject: [PATCH 1/3] updated routing.md https://github.com/vuejs/docs-next/commit/da712359f8255d284e426bd271d690d16fdf6307#diff-c45fc2647705fe83e278fa345f8655c0f0b0e3729a998e8a698842aab60cc046 --- src/guide/routing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/routing.md b/src/guide/routing.md index 34ddeb9d..417a2498 100644 --- a/src/guide/routing.md +++ b/src/guide/routing.md @@ -2,7 +2,7 @@ ## 公式ルータ -ほとんどのシングルページアプリケーションでは、公式にサポートされている [vue-router ライブラリ](https://github.com/vuejs/vue-router)を使うことをオススメします。詳細は vue-router の[ドキュメント](https://router.vuejs.org/)を参照してください。 +ほとんどのシングルページアプリケーションでは、公式にサポートされている [vue-router ライブラリ](https://github.com/vuejs/vue-router)を使うことをオススメします。詳細は vue-router の[ドキュメント](https://next.router.vuejs.org/)を参照してください。 ## スクラッチからのシンプルなルーティング From 48ffb98dd740dcbbab08200d505642445f452fb0 Mon Sep 17 00:00:00 2001 From: Naoki Endoh Date: Sun, 2 May 2021 22:04:36 +0900 Subject: [PATCH 2/3] Swap more examples to destructuring for accessing the global Vue https://github.com/vuejs/docs-next/commit/e5b34b2bdbe3295f9fe33367a363577875c27d53#diff-c45fc2647705fe83e278fa345f8655c0f0b0e3729a998e8a698842aab60cc046 --- src/guide/routing.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/guide/routing.md b/src/guide/routing.md index 417a2498..f7b1ba76 100644 --- a/src/guide/routing.md +++ b/src/guide/routing.md @@ -9,6 +9,8 @@ とてもシンプルなルーティングだけが必要で、フル機能のルータライブラリを使用したくない場合は、以下のようにページレベルのコンポーネントで動的にレンダリングができます。 ```js +const { createApp, h } = Vue + const NotFoundComponent = { template: '

Page not found

' } const HomeComponent = { template: '

Home page

' } const AboutComponent = { template: '

About page

' } @@ -30,11 +32,11 @@ const SimpleRouter = { }, render() { - return Vue.h(this.CurrentComponent) + return h(this.CurrentComponent) } } -Vue.createApp(SimpleRouter).mount('#app') +createApp(SimpleRouter).mount('#app') ``` [History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API/Working_with_the_History_API) と組み合わせることで、とても基本的ですが完全に機能するクライアント側のルータを構築できます。実際に確認するには、[このサンプルアプリ](https://github.com/phanan/vue-3.0-simple-routing-example)をチェックしてみてください。 From 7c1aad0014a4ea36381ec178c40b180a3938bf8f Mon Sep 17 00:00:00 2001 From: Naoki Endoh Date: Sun, 2 May 2021 22:05:46 +0900 Subject: [PATCH 3/3] Link vue-router-next in routing page https://github.com/vuejs/docs-next/commit/b4b3eafe0dfb543a444da6d8910719d64133cdbc#diff-c45fc2647705fe83e278fa345f8655c0f0b0e3729a998e8a698842aab60cc046 --- src/guide/routing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/routing.md b/src/guide/routing.md index f7b1ba76..51c59e75 100644 --- a/src/guide/routing.md +++ b/src/guide/routing.md @@ -2,7 +2,7 @@ ## 公式ルータ -ほとんどのシングルページアプリケーションでは、公式にサポートされている [vue-router ライブラリ](https://github.com/vuejs/vue-router)を使うことをオススメします。詳細は vue-router の[ドキュメント](https://next.router.vuejs.org/)を参照してください。 +ほとんどのシングルページアプリケーションでは、公式にサポートされている [vue-router ライブラリ](https://github.com/vuejs/vue-router-next)を使うことをオススメします。詳細は vue-router の[ドキュメント](https://next.router.vuejs.org/)を参照してください。 ## スクラッチからのシンプルなルーティング