All Questions

Tagged with
Filter by
Sorted by
Tagged with
2 votes
2 answers
5k views

How to conditionally render a button / Link Next.js Component with TypeScript

I ran into a very annoying problem is that I get a bunch of typescript errors, while trying to conditionally render the Next.js Link component or a button element. So if the href prop is passed, I ...
Denis's user avatar
  • 23
1 vote
1 answer
2k views

How to fix Typescript error on Next JS next/link element

The following code is throwing me this Typescript error: Type 'string' is not assignable to type 'RouteOrQuery'.ts(2322) nextjs-routes.d.ts(32, 5): The expected type comes from property 'href' which ...
Barry Horbal's user avatar
1 vote
4 answers
2k views

NextJs <Link> doesn't rerun scripts

When I use the <Link> tag in NextJs to navigate between pages it doesn't rerun my scripts after changing pages. It only runs the scripts after the first page load or when I press reload. When ...
Dan P's user avatar
  • 53
0 votes
2 answers
41 views

Problems to make the link component work in next.js [duplicate]

I have been doing a blog with next.js and I am creating the header, but the links are not working, I read the next.js documentation and made the links step by step, but every time I reload my website ...
Andrea Lopez Bravo's user avatar