JuanMCe
navigateTo inside useAsyncData
I have this request in my SPA component:
When I trigget tha navigateTo on the catch, the browser stills throws an error:
TypeError: Cannot read properties of undefined (reading 'type')
which comes from this line const productType = computed(() => product.value.type);
I am assuming that the page is being mounted before the navigateTo runs but I don't understand why because the error does not happen if the request is successfull.9 replies
external library overriding component scoped classes in style
I have a modal component with scoped style like this
I was asked to integrate a library (via html script) that has an internal modal.
That library for some reason clashes with my component classes (modal-wrapper and modal-container)
The computed styles are both the library and component mixed together (like it's treating the component styles as global)
8 replies
Redirect inside asyncData
I want to redirect to a named route inside asyncData, my nuxt project is
ssr: false
I have something like this in my Page component:
I have a router.js
file I use to extend some routes with extendRoutes
in my nuxt config.
My route is defined like this:
I get redirected to my home instead and I get this error in the browser console:
[vue-router] Route with name 'exchange-status' does not exist
I can enter the route directly without problems but I have no idea why redirect doesn't work2 replies