React Router

Wildcard route

A splat pattern can handle otherwise unmatched locations; it does not set an HTTP status.

Formal Syntax & Structure

react syntaxreact
<Route path="*" element={<NotFound />} />

Working Example

Example Snippetreact
<Route path="*" element={<p>Page not found</p>} />
React Reference