import { historyMutation } from 'history-mutation'
注册:
// main.js
historyMutation.register()
使用:
historyMutation.on('change', (state, previousState) => {
console.log(state, previousState)
})
const currentState = historyMutation.state
console.log(currentState)