Closed rashidpathiyil closed 2 years ago
Why is this closed? this issue still exists. How to use store in src/acl/index.js ??
Why is this closed? this issue still exists. How to use store in src/acl/index.js ??
Pinia is supported. Read through the README, you can basically use Pinia or Vuex same way, replace the value of "user" option with the user object from your Pinia store.
Pinia is supported, but do not work as described, there are race condition in createApp, and acl almost always lose it, causing error "pinia not defined". So if you need to use it, make next workaround:
create e.g "store/index.ts" file with next content:
import { createPinia, setActivePinia } from "pinia"; const pinia = createPinia(); setActivePinia(pinia); export default pinia;
Then in your main.js file use "import pinia from "./store";" instead "import { createPinia } from "pinia"; const pinia = createPinia();"
ACL running before pinia store.