T
TanStack3mo ago
adverse-sapphire

How to handle modals (query params, or <outlet />

Hi, I am coming from Next js and how we used to handle modals by using Nuqs package (query params) - so that modals can persist in the url. However, i am not sure if this is possible with tanstack router. Do you have any experience in how u render your modals? Right now i am using Zustand and have a modalprovider.
3 Replies
correct-apricot
correct-apricot3mo ago
Hey, can you elaborate you question a bit more? I am not sure what you want to achieve. Tanstack router gives you full freedom with your url search or query params, so you should be able to achieve the same as with nextjs.
adverse-sapphire
adverse-sapphireOP3mo ago
@LenB Hey LenB, thanks for answer. Lets say i want to be able to open a specific modal when the url has ?isCreating=true. How would i do this in tantsack router. Or how can i do this /slug/calendar/{add-workspace} route - whenever /add-workspace is in the url the modal should render.
correct-apricot
correct-apricot2mo ago
Hello, i'm currently asking myself the same question, do you mind sharing if you had nay feedback about that ?

Did you find this page helpful?