Set Search pagrams
Answered
North Pacific hake posted this in #help-forum
North Pacific hakeOP
Why do i have to set imageSearchParams and then put it in the Link element,
is this redundant . Thank you yall in advance
is this redundant . Thank you yall in advance
Answered by DirtyCajunRice | AppDir
@North Pacific hake link accepts an object that has the path and query params. no need to build a string
9 Replies
European sprat
this is how it's done
you can just add the string yourself, you don't NEED to use URLSearchParams
North Pacific hakeOP
If i dont set Image param, do i get something out of this "const imageSearchParam = searchParams.get('image');".
Im curious, when u click the link that has searchParams in it, it will navigate to a url that has image search param, then searchParams.get('image') will get something from the URl.
Please correct me if im wrong.
Im curious, when u click the link that has searchParams in it, it will navigate to a url that has image search param, then searchParams.get('image') will get something from the URl.
Please correct me if im wrong.
European sprat
i don't know what you're asking
search params is just the query string
North Pacific hakeOP
If I remove set image param, the URL won't change when i navigate through the images, and the URL won't reflect the currently displayed image. Is this right,
I thought The URL would change if the Link Href just includes an image param ( < Link href="hostname/product/acme-slip-on-shoes?image=1"
I thought The URL would change if the Link Href just includes an image param ( < Link href="hostname/product/acme-slip-on-shoes?image=1"
@North Pacific hake link accepts an object that has the path and query params. no need to build a string
Answer
@DirtyCajunRice | AppDir <@759115475711426591> link accepts an object that has the path and query params. no need to build a string
North Pacific hakeOP
what ur saying is that setting query params is not necessary right?
no im saying you can set them as an object