8000 fix example nested routes · vuejs/rfcs@ee939b3 · GitHub
[go: up one dir, main page]

Skip to content

Commit ee939b3

Browse files
authored
fix example nested routes
1 parent b38dd36 commit ee939b3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

active-rfcs/0028-router-active-link.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,16 @@ Note: **This behavior is different from actual behavior**.
118118
It's worth noting, it is possible to nest them to still benefit from links being _active_:
119119

120120
```js
121+
// Vue 3
122+
import { h } from 'vue'
123+
import { RouterView } from 'vue-router'
124+
121125
const routes = [
122126
{
123127
path: '/movies',
124128
// we need this to render the children (see note below)
125-
component: { render: () => h('RouterView') },
129+
component: { render: () => h(RouterView) },
130+
// for vue 2 use render: h => h('RouterView')
126131
children: [
127132
{ path: 'new' },
128133
// different child

0 commit comments

Comments
 (0)
0