Skip to content

Commit c7a2852

Browse files
Vincent Cantinchrisvfritz
Vincent Cantin
authored andcommitted
Makes a render() feature more obvious to the reader + typos (vuejs#952)
* Makes a feature more obvious to the reader ... following an issue that I encountered. vuejs/vue#5870 (comment) * Added some missing commas
1 parent 02ada02 commit c7a2852

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/v2/guide/render-function.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,16 @@ createElement(
106106
},
107107

108108
// {String | Array}
109-
// Children VNodes. Optional.
109+
// Children VNodes, built using createElement(),
110+
// or simply using strings to get 'text VNodes'. Optional.
110111
[
111-
createElement('h1', 'hello world'),
112+
'Some text comes first.',
113+
createElement('h1', 'A headline'),
112114
createElement(MyComponent, {
113115
props: {
114-
someProp: 'foo'
116+
someProp: 'foobar'
115117
}
116-
}),
117-
'bar'
118+
})
118119
]
119120
)
120121
```
@@ -166,7 +167,7 @@ One thing to note: similar to how `v-bind:class` and `v-bind:style` have special
166167
directives: [
167168
{
168169
name: 'my-custom-directive',
169-
value: '2'
170+
value: '2',
170171
expression: '1 + 1',
171172
arg: 'foo',
172173
modifiers: {
@@ -181,7 +182,7 @@ One thing to note: similar to how `v-bind:class` and `v-bind:style` have special
181182
},
182183
// The name of the slot, if this component is the
183184
// child of another component
184-
slot: 'name-of-slot'
185+
slot: 'name-of-slot',
185186
// Other special top-level properties
186187
key: 'myKey',
187188
ref: 'myRef'

0 commit comments

Comments
 (0)