Skip to content

Commit 93a946a

Browse files
committed
update slots syntax for render function
1 parent 86456be commit 93a946a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/guide/render-function.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ Everything the component needs is passed through `context`, which is an object c
316316

317317
- `props`: An object of the provided props
318318
- `children`: An array of the VNode children
319-
- `slots`: A function returning a slots object
319+
- `slots`: A slots object
320320
- `data`: The entire data object passed to the component
321321
- `parent`: A reference to the parent component
322322

@@ -366,7 +366,7 @@ Vue.component('smart-list', {
366366

367367
### `slots` vs `children`
368368

369-
You may wonder why we need both `slots` and `children`. Wouldn't `slots().default` be the same as `children`? In some cases, yes - but what if you have a functional component with the following children?
369+
You may wonder why we need both `slots` and `children`. Wouldn't `slots.default` be the same as `children`? In some cases, yes - but what if you have a functional component with the following children?
370370

371371
``` html
372372
<my-functional-component>

0 commit comments

Comments
 (0)