아래와 코드에서 const showProfileDropdown = ref(false)이 친구는 값이 바뀌는 친구 인데 const를 쓴 이유가 궁금합니다.
혹시 ref와 연관이 있을까요?
export default {
setup() {
const routes = ref([])
const showProfileDropdown = ref(false)
const currentUser = computed(()=>store.state.user)
onBeforeMount(()=>{
routes.value = router.options.routes
})
const onLogout = async ()=> {
await auth.signOut()
store.commit("SET_USER",null);
await router.replace("/login");
}
return {
routes,
showProfileDropdown,
onLogout,
currentUser,
}
}
}
넵 그냥 ref로 지정할때는 싹다 const로 쓰겟습니다 문제가 안된다면