[Vuejs]-Can i use new Map() in vuex and computed?

0👍

my bad.
vuex and computed doesn’t support new Map() and Set() as they don’t serialize.

I must change the data type.

https://kr.vuejs.org/v2/api/index.html

0👍

It works by assigning a new clone with desired changes.

state.files = new Map(allFiles);

Leave a comment