8000 clarify usage of data in render function doc (#1553) · kevinheader/vuejs.org@1edc0c3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1edc0c3

Browse files
authored
clarify usage of data in render function doc (vuejs#1553)
1 parent 61dd82e commit 1edc0c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/v2/guide/render-function.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ For more on how JSX maps to JavaScript, see the [usage docs](https://github.com/
499499

500500
The anchored heading component we created earlier is relatively simple. It doesn't manage any state, watch any state passed to it, and it has no lifecycle methods. Really, it's only a function with some props.
501501

502-
In cases like this, we can mark components as `functional`, which means that they're stateless (no `data`) and instanceless (no `this` context). A **functional component** looks like this:
502+
In cases like this, we can mark components as `functional`, which means that they're stateless (no [reactive data](../api/#Options-Data)) and instanceless (no `this` context). A **functional component** looks like this:
503503

504504
``` js
505505
Vue.component('my-component', {
@@ -530,7 +530,7 @@ Everything the component needs is passed through `context`, which is an object c
530530
- `props`: An object of the provided props
531531
- `children`: An array of the VNode children
532532
- `slots`: A function returning a slots object
533-
- `data`: The entire data object passed to the component
533+
- `data`: The entire [data object](#The-Data-Object-In-Depth), passed to the component as the 2nd argument of `createElement`
534534
- `parent`: A reference to the parent component
535535
- `listeners`: (2.3.0+) An object containing parent-registered event listeners. This is an alias to `data.on`
536536
- `injections`: (2.3.0+) if using the [`inject`](../api/#provide-inject) option, this will contain resolved injections.

0 commit comments

Comments
 (0)
0