vuex-undo-redo icon indicating copy to clipboard operation
vuex-undo-redo copied to clipboard

Bug: vuex-undo-redo subscribes once per component

Open caugner opened this issue 4 years ago • 1 comments

I'm trying to trace down performance issues with regard to the undo functionality provided by this plugin.

When adding a console.log statement to created() here:

https://github.com/anthonygore/vuex-undo-redo/blob/6e34a39718320fbf956fb505ed3b13857c9678ce/src/plugin.js#L17-L28

I noticed that this callback is actually called several times, basically once for each created component, which leads to Vuex accumulating hundreds of subscribers.

I'm not sure how to fix this though.

caugner avatar Jul 08 '20 12:07 caugner

Yes, I'm curious on this one.

dpeckham avatar Jan 01 '21 21:01 dpeckham