Skip to content

Update list.md #1429

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 2 commits into from
Mar 10, 2018
Merged

Update list.md #1429

merged 2 commits into from
Mar 10, 2018

Conversation

01abhishekjain
Copy link
Contributor

  1. Give example to for better understanding of caveats.
  2. Inform about vm.$set instance method as another way to circumvent the caveat.

vm.items.splice(indexOfItem, 1, newValue)
```

You can also use the `vm.$set` instance method, which is an alias for the global `Vue.set`:
Copy link
Member

Choose a reason for hiding this comment

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

I think this needs a link to the API docs to be included: https://vuejs.org/v2/api/#vm-set

Copy link
Contributor Author

@01abhishekjain 01abhishekjain Mar 10, 2018

Choose a reason for hiding this comment

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

Sounds like a good idea, especially since vm.$set is also talked about later, in the Object change detection caveats section.

EDIT:
Added a new commit for this 🤞

@sdras
Copy link
Member

sdras commented Mar 10, 2018

This looks like a really good addition, I just have one comment for a fix.

link `vm.$set` to the API doc
@sdras
Copy link
Member

sdras commented Mar 10, 2018

Looks good!

@sdras sdras merged commit 6fd9f0a into vuejs:master Mar 10, 2018
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