<Link> component to append a new /route?
Answered
Da_v_id posted this in #help-forum
Da_v_idOP
Hi is it possible to append /add to my current route rather than replace the entire route?
Answered by B33fb0n3
then you can still do like this:
<Link href={dynamicParam + "/add"}>Navigate</Link>7 Replies
I guess yes
@James4u I guess yes
Da_v_idOP
oh, i meant to ask how to do it in a server component?
@Da_v_id oh, i meant to ask how to do it in a server component?
yes, you can do that be repeating the one before the new "/add" like this:
you are on:
You want to go to
And then you can use a link component like:
As you can see, the
you are on:
/hello/world/You want to go to
/hello/world/addAnd then you can use a link component like:
<Link href={"world/add"}>Navigate</Link>As you can see, the
hello won't be repeated and you are inside a server componentOriginal message was deleted
then you can still do like this:
<Link href={dynamicParam + "/add"}>Navigate</Link>Answer
@Da_v_id solved?
Da_v_idOP
yes, thank you!
happy to help