Skip to content

Commit a3dadce

Browse files
committed
improve JSX introduction, fixes vuejs#464
1 parent 57b082d commit a3dadce

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/guide/render-function.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,22 @@ render: function (createElement) {
266266

267267
## JSX
268268

269-
If you're writing a lot of `render` functions, it might feel painful that we're using 14 lines above in place of this much simpler and arguably more readable template:
269+
If you're writing a lot of `render` functions, it might feel painful to write something like this:
270+
271+
``` js
272+
createElement(
273+
'anchored-heading', {
274+
props: {
275+
level: 1
276+
}
277+
}, [
278+
createElement('span', 'Hello'),
279+
' world!'
280+
]
281+
)
282+
```
283+
284+
Especially when the template version is so simple in comparison:
270285

271286
``` html
272287
<anchored-heading :level="1">

0 commit comments

Comments
 (0)