-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
HMR 🔥Related to Hot Module ReplacementRelated to Hot Module Replacement✨ enhancementNew feature or requestNew feature or request
Description
I have some code like this , it could output correctly when app first loaded or refresh ,but don‘t work after HMR.
const pinia = createPinia();
pinia.use(({ store }) => {
store.$subscribe((mutations, state) => {
console.log('trigger subscritions ', mutations, state);
});
});I have add some breakpoints in Pinia.js ,and found that subscriptions is emty [] after HMR.
// the "subscriptions" is empty [] after HMR
function triggerSubscriptions(subscriptions, ...args) {
subscriptions.forEach((callback) => {
callback(...args);
});
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
HMR 🔥Related to Hot Module ReplacementRelated to Hot Module Replacement✨ enhancementNew feature or requestNew feature or request
Type
Projects
Status
📋 Backlog