Skip to content
Source
Sign inSign up
TanStack/router

Throwing `notFound()` in `beforeLoad()` already shows the error during preload #1796

Send to my agent
Closedmelv-n(GitHub profile, opens in a new tab) opened this issue 1 comment

Describe the bug

I don't even need to click the link, as soon as I hover over it, I get the "Not found" error message?

Your Example Website or App

https://stackblitz.com/edit/tanstack-router-xxntjv?file=src%2Froutes%2Fbrowse.%24.tsx

Steps to Reproduce the Bug or Issue

  1. Go to /browse
  2. Hover over "Browse 404"

Expected behavior

No error, just a preloading in the background. Only when I click the link will I see the not found error.

Actual behavior

The 404 error is shown as soon as I hover over the link as a result of preloading that page.

Platform

  • OS: macOS + Arc 1.47

Additional context

No response

Sign in to join this conversation.