4 months ago

Vue Reactivity Issue

Posted 4 months ago by drewdan

Hey Guys, I am trying to delete an element in a nested array in Vue/Vuex, and the array does not exist until after it is created dynamically:

DELETE_TEAM_MEMBER(state, { team, gymnast }) {
	state.teams[team].members.splice(gymnast, 1);

This works, and the element gets deleted, but the reactivity does not seem to work.

I know you can use Vue.set to add items where the reactivity does not happen by default, but if there a way to force reactivity when unsetting something?

Cheers Guys :)

Please sign in or create an account to participate in this conversation.