NuxtN
Nuxtβ€’17mo agoβ€’
1 reply
RicharDVD

Query parameter as default value of ref

Might be a dumb question but I have the following code:

const currentTab = ref(route.query.zakelijk === 'true' ? 1 : 0);


This seems to work fine in development but there are some weird things in production during SSR and I wonder if this could be the culprit. https://www.autoatlas.nl/voorraad/807344313?zakelijk=true. Is route.query not available during SSR? The value of currentTab seems to be right but the template doesn't reflect that.

When changing the 'Particulier' and 'Zakelijk' tab it doesn't work and shows the following errors in the console.

When removing the query parameter it seems to work fine.

Thanks in advance πŸ™‚
image.png
Auto Atlas
Bekijk de details van de Audi A3 Sportback 30 TFSI|VIRTUAL|19''|LEDER|CRUISE|PDC
Auto Atlas
Was this page helpful?