Skip to content

Commit 2915212

Browse files
authored
Update render-function.md (#708)
`Array.apply(null, { length: n })` is too hard to understand. `Array.from({ length: n })` is much more straightforward in given context. Arrow functions are used in examples, so we can use ES2015.
1 parent da71235 commit 2915212

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/guide/render-function.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ If you really want to duplicate the same element/component many times, you can d
233233
```js
234234
render() {
235235
return Vue.h('div',
236-
Array.apply(null, { length: 20 }).map(() => {
236+
Array.from({ length: 20 }).map(() => {
237237
return Vue.h('p', 'hi')
238238
})
239239
)

0 commit comments

Comments
 (0)