Questions tagged [next-link]
67 questions
0
votes
0 answers
Next js file routing not working after deployment
i created and deployed a next js application on vercel using github , after deployment i access the site , i noticed that the homepage loads just fine but i am unable to access other pages the application returns 500 | internal server error
these…

Srajan Barkade
- 51
- 4
0
votes
0 answers
How to capture the next/link events into the action pane?
how to capture the next/link events into the action pane? I would prefer clicking on a link doesn't navigate to the image or another page.
I can only get the current click action by using @storybook/addon-actions.

Christopher Tian
- 1
- 2
0
votes
0 answers
Passing nested data via router.query in next.js resulting in " " on the nested data
Before I pass my data to my query, the user's data is complete and it has all the data but when it's passed on the receiving url, it's missing some data.
I passed the data like this
href={{ pathname: "/update/" + user.id, query: user, }}
And…
0
votes
1 answer
How to navigate correctly in nextjs
idk it's pretty simple or what but having difficulty understanding it.
here is one parent div wrapped with nextjs Link tag(which navigates me to /playing route) and in this div i have one more tag which can navigate me to login page. here is the…

Ansh Rathod
- 55
- 8
0
votes
1 answer
"Hydration failed because the initial UI does not match......" error showing when I m nesting multiple div inside next Link tag
React 18: Hydration failed because the initial UI does not match what was rendered on the server error showing when I am nesting multiple div in a Link tag
my code is given below:-

Amir 4ever
- 1
- 1
0
votes
2 answers
How to send a unique id to the next page while navigating using Link in NextJS
I am trying to send an id to the next page when the user navigates.
I have a homepage where I am fetching an Array of data and using .map to display it in a kind of card-based UI.
Now, when the user clicks the card, they will be navigated to the…

anshul
- 661
- 9
- 27
0
votes
1 answer
NextJs: Next Link router query returns undefined after submitting form on page
I am using nextjs, I have a page where it lists out all clients, I can then click each client name that links (using next/link) to a page specifically for that client. It loads correctly using useEffect and useState. If I refresh manually all data…

tester0001
- 21
- 1
- 5
0
votes
1 answer
Nextjs Link not redirect page properly
I am using slug page directory with next.js.
My directory is
Pages
-Main
--[cat]
---[content].js
When i use next/link from another page to go content page it works and loads fine. But when i use some other link like main/cat/content inside from…

comeonalready
- 33
- 7
0
votes
4 answers
My Link with href doesn't scroll even though the link changes. Nextjs
I'm working on a react with nextjs project.
I'm using Link to scroll to a specific section on the same page.
Here is one of the components that use Link:
import styles from './section1.module.scss';
import Image from 'next/image';
import Button from…

Mihai INT
- 15
- 1
- 4
0
votes
0 answers
Next / Link doesn't route to the next page when clicked before the page has completely loaded
import Link from 'next/link';
...
test
Clicking on the link doesn't route to the next page when the network is slow, and the entire page hasn't been completely loaded (all the js chunks haven't been fetched from the…

Abhishek Kumar
- 3
- 3
0
votes
1 answer
Next/Link refreshes page on shallow routing
I have a Link:
passBackNumber(number)}
>
{number}
where StyledLink is my…

Alyona
- 1,682
- 2
- 21
- 44
0
votes
1 answer
Handling DynamicRouting
i have a challenge while using next/link while using the [folder] in next.js
enter image description here
above is my pages tree. A user is supposed to be sent to the route .types/[type] , type being the dynamic name of the product the user…

jeho Ntanda
- 53
- 1
- 8
0
votes
1 answer
next/link redirect and should to scroll, it should directly positioning to top
I have next js web, which has some links to redirect on the footer,
so if I click on that link it is first redirected to that page with scrolled down(current position) and then scrolls the up
I don't want to scroll up, it should by default from the…

Tanuj Doshi
- 51
- 2
- 8
0
votes
2 answers
NextJS Link href default value
I need a default href value for Next/Link, as we do in plain html like below
I tried this to Link but it reloads the page, if I keep it empty it produces some error because its required attribute
Actually I…

MVP
- 83
- 3
- 9
0
votes
0 answers
how to link to page in Next.js with locale when project is in subdirectory?
I have a problem with routing in next.js.
Project on the server is in subdirectory: exmaple.com/app.
Routing i want to achieve: example.com/app//
(add prefix before url). When I'm trying to add it in href Link generates url this…

Dawid Mazewski
- 141
- 8