You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/guide/render-function.md
+16-1Lines changed: 16 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -266,7 +266,22 @@ render: function (createElement) {
266
266
267
267
## JSX
268
268
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:
0 commit comments