Skip to content
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

No Reactivity on ES6 Collections: Map, Set, WeakMap, WeakSet #10077

Closed
frankier opened this issue May 28, 2019 · 1 comment
Closed

No Reactivity on ES6 Collections: Map, Set, WeakMap, WeakSet #10077

frankier opened this issue May 28, 2019 · 1 comment

Comments

@frankier
Copy link

What problem does this feature solve?

Currently, adding one of Map, Set, WeakMap, WeakSet as a data attribute of a Vue component will mean there. Vue should do the same as it does with Array and patch methods like add() and remove()

Adding this feature solves the problem of for example being able to store unique lists of anything (Sets) or maps with structures as keys (since object keys always behave as strings).

The expected behaviour is that when add() does not actually modify a set, nothing would be triggered.

It's possible there is no good use for WeakMap, WeakSet. In that case there's no need to add these too.

What does the proposed API look like?

There's no change in the API from a user perspective. There would need to be documentation that Vue does basically the

@frankier frankier changed the title No Reactivity on ES6 Collections: Map, Set, WeakMap, WeakSet — SitePoint No Reactivity on ES6 Collections: Map, Set, WeakMap, WeakSet May 28, 2019
@posva
Copy link
Member

posva commented May 28, 2019

Duplicate of #6774

@posva posva marked this as a duplicate of #6774 May 28, 2019
@posva posva closed this as completed May 28, 2019
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

No branches or pull requests

2 participants