#How to add paramters in URl, using the nextJs app router

9 messages · Page 1 of 1 (latest)

verbal iron
#

I have been trying to add search params for ever now using the nextjs app router and it's giving me errors

  const router = useRouter();
    router.push('/search/?v='+ version)
``` i had some thing like this and i have been trying but it's not working
wary impBOT
#

🔎 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)

vital raftBOT
# verbal iron I have been trying to add search params for ever now using the nextjs app router...
Please add more information to your question

Your question currently does not have sufficient information for people to be able to help. Please add more information to help us help you, for example: relevant code snippets, a reproduction repository, and/or more detailed error messages. See more info on how to ask a good question in https://discord.com/channels/752553802359505017/1138338531983491154 and #welcome message

verbal iron
# vital raft

i also tried this
const sp = new URLSearchParams(); all i'm trying to do is add a parameter to my existing URL on some react events, i have not been able to get any results and i can't find anything in the documentaion

frail sentinel
verbal iron
frail sentinel
frail sentinel