defaultNotFoundComponent
i'm switching from Next.js making first attempts with TanStack start, including the router of course.
I've been defining a super simple news page with a a
/news route and a /news/$slug route. In the second routes loader() component I'm throwing notFound() in case there's no news article with that slug.I've tried two options to define a 404 error page, one by passing a
notFoundComponent function to the root route (as argument to createRootRouteWithContext) and I've tried passing the same function to defaultNotFoundComponent to the router defined in router.tsx. The first doesn't seem to have any effect (console shows message about no notFound component being available), when defining it on router level, the message is not shown, but the returned content is also not what is defined in my component (just
<body><pre>Cannot GET /news/asd</pre></body>).How do I properly define a global notFound component?