Closed LHofman closed 2 years ago
Can you provide a proper repo/stackblitz for faster reproduction?
Also is this issue known for Pinia standalone, is it solely due to the plugin being added ?
The plugin doenst use the onUnmounted itself, might be because of state subscription ($subscribe
)
nevermind, it's a bug. at some point i dropped the detached: true from subscription. will fix it asap
Fixed with #102 release in 2.1.1
Describe the bug
Version 2.1.0
Steps to reproduce
npm init vue@latest
(include TS and Pinia for state management)cd .\vue-project\
npm i
npm i pinia-plugin-persistedstate
pinia.use(piniaPluginPersistedstate);
and add, persist: true
to the counter storenpm run dev
What is expected? No warnings are given in the browser
What is actually happening? A warning is given
runtime-core.esm-bundler.js:38 [Vue warn]: onUnmounted is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.
Reproduction
See above
System Info
Used Package Manager
npm
Validations