Hi, I am building a dashboard for different projects with a projectSwitcher (I am just using Shadcn's sidebar07), and I was just wondering how should i track the selected project to render the right dashboard? should i store the ID in the URL? should i store it as a react Context + local storage? or add an entry in the database?
#URL, ReactContext, Server for Dashboard?
9 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
@fading dune well I would suggest to store the id in the url.
you can also just use a state/context but I don't see any cons of using id in the url
https://nuqs.47ng.com/
check out above library ⬆️ (I don't mean only search params you can also use dynamic routing if it's okay e.g gmail with several accounts)
@fading dune any opinion?
apologises for the late response! Yea that makes totally sense, do you know if nuqs helps with queryParams as well? or just Search Query?
✅ Success!
This question has been marked as answered! If you have any other questions, feel free to create another post
Jump to answer
[Click here](#1303112280980066335 message)
what do you mean by query param vs search query? I think they are the same.
or did you mean dynamic path slug?