anthonygore/vuex-undo-redo

How to use this on Modular state

rendyfebry opened this issue · 2 comments

Very interested vuex plugin,

Can you tell me how to use this on Vuex module state?

Let's say I have something like this

const store = new Vuex.Store({
	modules: {
		user,
	}
}
const user = {
	namespaced: true,
	state: {
		userId: 0,
	}
}

Where should I place the emptyState mutation?

U can try to place emptyState in const mutations = {...} in every modules. I think it should work

Hey @rendyfebry
I haven't actually experimented with that. Can you try @AlexQuidditch 's suggestion. If it doesn't work I'll look into it further.