Radoslav Stankov
Jul 19, 2023 â‹… 6 min read

Dealing with links in Next.js

Radoslav Stankov Software developer. Head of Engineering at Product Hunt. Organizer of @ReactNotAConf. Speaker. Trying to blog more at blog.rstankov.com 🤖

Recent posts:

Build Full-Stack App React Goxygen

Build a full-stack app with React and Goxygen

We show how to use Goxgen to scaffold a full-stack React app. See how to integrate React with Go and modify Goxygen to suit your project requirements.

Clara Ekekenta
Dec 6, 2023 â‹… 8 min read
Express Js Adoption Guide Overview Examples Alternatives

Express.js adoption guide: Overview, examples, and alternatives

Express.js is a Node.js framework for creating maintainable and fast backend web applications in JavaScript. In the fast-paced world of […]

Antonello Zanini
Dec 6, 2023 â‹… 17 min read
Nesting web components in vanilla JavaScript

Nesting web components in vanilla JavaScript

Web components are underrated for the performance and ergonomic benefits they provide in vanilla JS. Learn how to nest them in this post.

Mark Conroy
Dec 5, 2023 â‹… 10 min read
Using Defer In Angular 17 To Implement Lazy Loading

Using defer in Angular 17 to implement lazy loading

Angular’s new defer feature, introduced in Angular 17, can help us optimize the delivery of our apps to end users.

Lewis Cianci
Dec 4, 2023 â‹… 10 min read
View all posts

2 Replies to "Dealing with links in Next.js"

  1. Hello, im getting 404 when refreshing page to which i’ve navigated using Link with as, i.e. simple any ideas? Using next 9.4.4

  2. It looks like you have a typo in your product path function:

    product(product: { id: string }) {
    return {
    href: ‘/products/[id],
    as: `/products/${id}`,

    You are missing the closing quote for href. I think it should be:

    product(product: { id: string }) {
    return {
    href: ‘/products/[id]’,
    as: `/products/${id}`,

    But I’m a PHP guy, so please correct me if I’m wrong.

Leave a Reply