Skip to content

Conversation

@alecgibson
Copy link
Collaborator

At the moment, when registering a dynamic module, we call
resetStoreState() just to register the getters for the new module.

It seems unnecessary to reset the entire store state in this case, and
this actually also leads to other issues.

This change is based on the test case added in
vuejs#2201

The approach taken in this change is to refactor the getter registration
into its own function, and call that new method when registering a
dynamic module instead of resetting the store state.

alecgibson and others added 3 commits September 1, 2023 09:29
This reverts commit 704d43e, reversing
changes made to 7b024d8.
Fixes vuejs#2197

At the moment, when registering a dynamic module, we call
`resetStoreState()` just to register the getters for the new module.

It seems unnecessary to reset the entire store state in this case, and
this actually also leads to [other issues][1].

This change is based on the test case added in
vuejs#2201

The approach taken in this change is to refactor the getter registration
into its own function, and call that new method when registering a
dynamic module instead of resetting the store state.

[1]: vuejs#2197
@alecgibson alecgibson merged commit 812af70 into main Sep 1, 2023
@alecgibson alecgibson deleted the alternative-fix branch September 1, 2023 08:33
alecgibson added a commit that referenced this pull request Sep 1, 2023
This reverts commit 812af70, reversing
changes made to 03bed24.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants