`Header` in __root reset on each navigation?
I have this floating bottom bar that I place in __root file. Its theme changes dynamically based on an IntersectionObserver. Its initial theme is dark. But the state always re-init when I change page, is that expected?
As you can see in the video at the end when the bar is light and I change from Blog page to Pricing page, it flashes back to dark
I thought that having a component in root (or any pathless route), when navigating, it would not repaint the components
5 Replies
fascinating-indigo•9mo ago
can you please provide a minimal complete example?
xenial-blackOP•9mo ago
Ok, while creating a reproduction I found that it works fine with a simpler example so I figured it's an issue with my setup. 👍
fascinating-indigo•9mo ago
could be a useRouterState hook without select (or similar hook that returns different value each time)
xenial-blackOP•9mo ago
I am using custom links with
createLink
and I used it wrong.xenial-blackOP•9mo ago
Before / After
