Change Pinia value before initial render
I'm using Pinia to store a boolean value that controls the visibility of a breadcrumbs component in the layout (
false
by default). Pages determine whether the breadcrumbs are displayed or not. In a page component in <script setup>
, if I toggle the breadcrumbs to true
, the breadcrumbs component isn't actually displayed until after the page is loaded on the client side, causing the content to abruptly shift down. Is it possible for this Pinia value change to happen during SSR so the breadcrumbs are visible at initial page load?
Here's what I'm doing (page data is coming from a headless CMS):
0 Replies