Vue: Sets/Maps/WeakSets/WeakMaps (collections) are not reactive.

Created on 11 Oct 2017  路  2Comments  路  Source: vuejs/vue

Version

2.4.4

Reproduction link

https://jsfiddle.net/z93jk3py/

Steps to reproduce

Create computed value based on Set/Map/WeakSet/WeakMap. update collection, computed value not updated

What is expected?

Expect View to be updated on collection update

What is actually happening?

View not updated.


If not mistaken, development has been done to wrap Arrays methods (pop, push..). Should same be done for methods of aforementioned collections?

Most helpful comment

Ah, found it: https://github.com/vuejs/vue/issues/1319#issuecomment-162742130 (thanks to https://github.com/vuejs/vue/issues/5241#issuecomment-288057627)
Just to be clear, it's something that we plan to add on a future version 馃檪

All 2 comments

Most of those collections not being supported by all browsers we cannot support them yet. I thought this was discussed in another issue but I couldn't find it.
In any case, this is something that will be added to v3 when we drop support for older browsers (https://github.com/vuejs/vue/issues/5893#issuecomment-308925671)

Ah, found it: https://github.com/vuejs/vue/issues/1319#issuecomment-162742130 (thanks to https://github.com/vuejs/vue/issues/5241#issuecomment-288057627)
Just to be clear, it's something that we plan to add on a future version 馃檪

Was this page helpful?
0 / 5 - 0 ratings

Related issues

loki0609 picture loki0609  路  3Comments

loki0609 picture loki0609  路  3Comments

bfis picture bfis  路  3Comments

fergaldoyle picture fergaldoyle  路  3Comments

aviggngyv picture aviggngyv  路  3Comments