
Ensure proper 404 error on fetcher.load call to a route without a loader ( #10345).Enhance LoaderFunction/ ActionFunction return type to prevent undefined from being a valid return value ( #10267).Allow useRevalidator() to resolve a loader-driven error boundary scenario ( #10369).Fix detection of useNavigate in the render cycle by setting the activeRef in a layout effect, allowing the navigate function to be passed to child components and called in a useEffect there ( #10394).Fix bug preventing rendering of descendant when RouterProvider errors existed ( #10374).Log loader/action errors caught by the default error boundary to the console in dev for easier stack trace evaluation ( #10286).We found some subtle bugs where router state updates got propagated before other normal useState updates, which could lead to foot guns in useEffect calls. Switched from useSyncExternalStore to useState for internal router state syncing in.Fail gracefully on and other invalid URL values ( #10367).


For a quick overview of this usage, check out Ryan's demo on Twitter. This could be useful for waiting for things such as waiting for images or CSS files to load (and technically, yes, you could use it for data loading but we'd still recommend using loaders for that 😀). This means that, for example, if one of your components in a destination route suspends and you have not provided a Suspense boundary to show a fallback, React will delay the rendering of the new UI and show the old UI until that asynchronous operation resolves. With 6.12.0 we've added better support for suspending components by wrapping the internal router state updates in React.startTransition.
