Closed
Description
In guide/migration/slots-unification, the syntax for passing slots to a component is incorrect.
RawSlots is not part of props, the second parameter in the used h overload, but part of third parameter children.
The syntax is correctly documented elsewhere: guide/render-function.
Suggested edit:
## 3.x Syntax
- In 3.x, render functions will have a `slots` option where they can be defined instead.
+ In 3.x, render functions can take an object of `slots` as the `children` parameter instead.
```js
// 3.x Syntax
- h(LayoutComponent, {
- slots: {
- header: () => h('div', this.header),
- content: () => h('div', this.content)
- }
+ h(LayoutComponent, {}, {
+ header: () => h('div', this.header),
+ content: () => h('div', this.content)
+ })
```
Metadata
Metadata
Assignees
Labels
No labels