Accessing injected dependency from pinia plugin in setup function #1611
Unanswered
kftang
asked this question in
Help and Questions
Replies: 1 comment 2 replies
-
I ended up getting around this by just making an empty store and accessing the lib from it, but I feel like there is a better way still. plugin:
lib store:
and in the store using lib:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How do I access an injected dependency? I'm using pinia.use() to provide a dependency (wasm module), and I need to use the dependency in my store.
How do I access the dependency if my stores are setup stores?
this
isn't defined since I'm using a setup functionEX:
How can I access this inside:
Beta Was this translation helpful? Give feedback.
All reactions