2023-07-19
1699
#nextjs
Radoslav Stankov
11910
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:

Using React Shepherd To Build A Site Tour

Using React Shepherd to build a site tour

React Shepherd stands out as a site tour library due to its elegant UI and out-of-the-box, easy-to-use React Context implementation.

Onuorah Bonaventure
May 1, 2024 â‹… 14 min read
A Guide To Cookies In Next Js

A guide to cookies in Next.js

Cookies are crucial to web development. This article will explore how to handle cookies in your Next.js applications.

Georgey V B
Apr 30, 2024 â‹… 10 min read
Handling Dates In JavaScript With Tempo

Handling dates in JavaScript with Tempo

Use the Tempo library to format dates and times in JavaScript while accounting for time zones, daylight saying time, and date internationalization.

Amazing Enyichi Agu
Apr 30, 2024 â‹… 8 min read
A Guide To Deno.cron

A guide to Deno.cron

This guide explores how to use the cron package in Deno, `Deno.cron`, to handle scheduling tasks with specific commands.

Rosario De Chiara
Apr 29, 2024 â‹… 5 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:

    “`js
    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