Please tell me how to realize the data management state of vuex and the data localization of reused components.

my current scenario is like this. Because the project I"m working on is complicated, and the page (component) I"m working on is complicated, I use vuex. At present, all the data on that page and the status control of the pop-up window are placed on a module of vuex. Then I suddenly thought of a problem, the current project is a dynamic menu, dynamic routing, but also can cache routing (cache component), that is, my component may be configured to two menus, different routes, but the common use of this component. In that case, the component uses vuex to manage the data, and the data must be shared. How can the data of vuex be localized? Has any great god ever encountered this problem? Who has solved this problem?

May.22,2022

solved with vuex dynamic module

Menu