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:

Actix Web Adoption Guide: Overview, Examples, And Alternatives

Actix Web adoption guide: Overview, examples, and alternatives

Actix Web is definitely a compelling option to consider, whether you are starting a new project or considering a framework switch.

Eze Sunday
Mar 18, 2024 â‹… 8 min read
Getting Started With NativeWind: Tailwind For React Native

Getting started with NativeWind: Tailwind for React Native

Explore the integration of Tailwind CSS with React Native through NativeWind for responsive mobile design.

Chinwike Maduabuchi
Mar 15, 2024 â‹… 11 min read
Developing A Cross Platform Tv App With React Native

Developing a cross-platform TV app with React Native

The react-tv-space-navigation library offers a comprehensive solution for developing a cross-platform TV app with React Native.

Emmanuel Odioko
Mar 14, 2024 â‹… 10 min read
Essential Tools For Implementing React Panel Layouts

Essential tools for implementing React panel layouts

Explore some of the best tools in the React ecosystem for creating dynamic panel layouts, including react-resizable-layout and react-resizable-panels.

David Omotayo
Mar 13, 2024 â‹… 8 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