Vue: Can\’t access Pinia Store in beforeEnter vue-router
Vue provides support for some functions in which we need store(outside of the components). To fix this problem I just called the useStore() function inside the function provided by Vue(beforeEach) and it worked.