Install & Download:
# NPM
$ npm install vuex-undo-redo --saveDescription:
This is a Vue.js plugin that enables undo & redo functionalities on Vuex applications.
How to use it:
1. Install, download, and install the plugin.
import VuexUndoRedo from 'vuex-undo-redo';
2. Register the plugin.
Vue.use(VuexUndoRedo);
3. Basic usage.
new Vuex.Store({
state: {
myVal: null
},
mutations: {
emptyState() {
this.replaceState({ myval: null });
}
}
});