Skip to content

Update render-function.md #708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 24, 2020
Merged

Update render-function.md #708

merged 1 commit into from
Nov 24, 2020

Conversation

exarus
Copy link
Contributor

@exarus exarus commented Nov 23, 2020

Simplify example for a little bit.

Description of Problem

Array.apply(null, { length: n }) is too hard to understand.

Proposed Solution

Array.from({ length: n }) is much more straightforward in given context. Arrow functions are used in examples, so we can use ES2015. Example is for advanced users, so some complexity is fine. Given the textual context the suggested code is clear enough.

Additional Information

`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.
Copy link
Member

@NataliaTepluhina NataliaTepluhina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@exarus thank you! Looks good to me 👍🏻

@NataliaTepluhina NataliaTepluhina merged commit 2915212 into vuejs:master Nov 24, 2020
nick-lai pushed a commit to nick-lai/docs-next that referenced this pull request Dec 2, 2020
`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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants