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

vuejs doesn't support Sets as backing fields for binding (nor maps, weakmap, weakset reactivity) #5241

Closed
amgadserry opened this issue Mar 21, 2017 · 6 comments

Comments

@amgadserry
Copy link

amgadserry commented Mar 21, 2017

Version

2.2.4

Reproduction link

https://github.com/amgadserry/vuejs-issue-sets or
https://jsfiddle.net/zab31wxz/1/

Steps to reproduce

click on the grey square

What is expected?

each click should switch text between true and false

What is actually happening?

it doesn't change text

@znck
Copy link
Member

znck commented Mar 21, 2017

Could you create repro on jsfiddle/codepen?

@amgadserry
Copy link
Author

@znck sure https://jsfiddle.net/zab31wxz/1/

@LinusBorg
Copy link
Member

LinusBorg commented Mar 21, 2017

Yes, you can't use Sets or Maps in reactive data currently. See as a related issue: #2410

@amgadserry
Copy link
Author

@LinusBorg is there any intentions of supporting such data types in the future ?

@LinusBorg
Copy link
Member

LinusBorg commented Mar 21, 2017

as explained by Evan in this #1319 (comment), we don't see the benefits big enough to justify the big changes that it would require, especially as long as native support is lacking (read: IE is still a supported platform, and Android also hasn't implemented Sets yet).

Also, the problem of not being serializable is something that I don't see going away anytime soon - but that's something all store solutions will have to take into account when thinking about persistence (localStorage ...)

That being said, I think it will be added some time in the future, but currently, it's not on our immediate todo-list.

@amgadserry
Copy link
Author

@LinusBorg okay then gonna close the issue

@posva posva changed the title vuejs doesn't support Sets as backing fields for binding vuejs doesn't support Sets as backing fields for binding (nor maps, weakmap reactivity) Oct 11, 2017
@posva posva changed the title vuejs doesn't support Sets as backing fields for binding (nor maps, weakmap reactivity) vuejs doesn't support Sets as backing fields for binding (nor maps, weakmap, weakset reactivity) Oct 11, 2017
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

3 participants