]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
docs: add note about transition and keepalive
authorEduardo San Martin Morote <posva13@gmail.com>
Fri, 31 Jul 2020 17:33:40 +0000 (19:33 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Fri, 31 Jul 2020 17:33:40 +0000 (19:33 +0200)
README.md

index 397a0df620dbcf2677c7fad815681e7027f50ad1..3422404f5413fc697bdfdd14fadd7eecef27f349 100644 (file)
--- a/README.md
+++ b/README.md
   })
   ```
 - The object returned in `scrollBehavior` is now similar to [`ScrollToOptions`](https://developer.mozilla.org/en-US/docs/Web/API/ScrollToOptions): `x` is renamed to `left` and `y` is renamed to `top`.
+- `transition` and `keep-alive` must now be used **inside** of `RouterView` via the `v-slot` API:
+  ```vue
+  <router-view v-slot="{ Component }">
+    <transition>
+      <keep-alive>
+        <component :is="Component" />
+      </keep-alive>
+    </transition>
+  </router-view>
+  ```
+  See more on the [KeepAlive](https://github.com/vuejs/vue-router-next/blob/master/e2e/keep-alive/index.ts) and the [Transition](https://github.com/vuejs/vue-router-next/blob/master/e2e/transitions/index.ts) examples.
 
 ### Typings