React Router

useRouteError

Read the error associated with a route boundary.

Formal Syntax & Structure

react syntaxreact
const error = useRouteError();

Working Example

Example Snippetreact
const error = useRouteError();
React Reference