vuejs / docs

📄 Documentation for Vue 3
https://vuejs.org
Other
2.81k stars 4.1k forks source link

Update list.md - description of iterating Objects with v-for #2804

Closed destradafilm closed 1 month ago

destradafilm commented 1 month ago

Update list.md to reflect a better description of result for iterating Objects in v-for

iterating v-for="value in myObject" is based on the result of calling Object.values()

Description of Problem

Minor nit - just reading the documentation and see that iterating an Object with v-for is more like Object.values than Object.keys

Proposed Solution

switch Object.keys() for Object.values()

Additional Information

netlify[bot] commented 1 month ago

Deploy Preview for vuejs ready!

Name Link
Latest commit 050c02b139b9fb1b1ce5e249d298a6eaf5aaf6ae
Latest deploy log https://app.netlify.com/sites/vuejs/deploys/661ef9044cc40b0008949776
Deploy Preview https://deploy-preview-2804--vuejs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

AloisSeckar commented 1 month ago

Object.keys() and Object.values() both return the same order of items on the same object. I think it is better to keep keys in the docs, because when you talk about "properties of an object", you would typically want to know their names (keys) rather than plain values without a context of their meaning...