Vue.js
pinia store에서 vue-router 사용하기
gommmmm
2025. 1. 13. 15:44
web push를 구현하다가 store에서 router를 이동해야 할 일이 생겼다.
평소처럼
import { useRouter } from 'vue-router'
const router = useRouter()
했는데
왜..
구글링 시작
https://stackoverflow.com/questions/70681667/cant-use-vue-router-and-pinia-inside-a-single-store
Can't use vue-router and pinia inside a single store
I am using pinia and vue-router 4.x ,but i am having a problem using both of them in a store. each works independently ,but not together. If i use import router from '../router' router will work but
stackoverflow.com
갓택오버플로우 천재발견
https://pinia.vuejs.org/core-concepts/plugins.html
Pinia | The intuitive store for Vue.js
Intuitive, type safe, light and flexible Store for Vue
pinia.vuejs.org
래핑하니까 정상동작한다!
공식문서에는 없는게 없다