router icon indicating copy to clipboard operation
router copied to clipboard

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

Open melv-n opened this issue 1 year ago • 0 comments

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

melv-n avatar Jun 20 '24 15:06 melv-n