Handle notFound in a component
Currently building a dashboard app with Tanstack Start + Query, though I don't think this question is relevant to Start specifically.
Is there a way to throw/navigate to the
notFound component in a route component (not the loader)? I won't know specifically if the page is a 404 until the query finishes, as I am in an $id route and querying for that specific item. I'd like to throw notFound if the query returns null.Is there any way to get there with the useNavigate or useRouter hook? I don't see anything in the documentation about getting there from either of those hooks.