Which project does this relate to?
Router
Describe the bug
Calling throw in a beforeLoad with primitive types such as string or number causes the entire router to hang - preventing the errorComponent from rendering.
This leads to the entire application effectively no longer rendering the router.
Your Example Website or App
https://stackblitz.com/edit/github-6olvwv8v?file=src%2Fmain.tsx
Steps to Reproduce the Bug or Issue
Implement a beforeLoad in a route that calls throw with a string or number.
Expected behavior
I expect the value to be thrown and rendered in the errorComponent, irrespective of its data type.
Screenshots or Videos
Platform
"@tanstack/react-router": "1.128.3"
Additional context
No response
Which project does this relate to?
Router
Describe the bug
Calling
throwin abeforeLoadwith primitive types such asstringornumbercauses the entire router to hang - preventing theerrorComponentfrom rendering.This leads to the entire application effectively no longer rendering the router.
Your Example Website or App
https://stackblitz.com/edit/github-6olvwv8v?file=src%2Fmain.tsx
Steps to Reproduce the Bug or Issue
Implement a
beforeLoadin a route that callsthrowwith astringornumber.Expected behavior
I expect the value to be thrown and rendered in the
errorComponent, irrespective of its data type.Screenshots or Videos
Platform
"@tanstack/react-router": "1.128.3"
Additional context
No response