Skip to main content

preloadRoutePattern

unstable_preloadRoutePattern

Data

Warning

This API is experimental and subject to breaking changes in minor/patch releases. Please use with caution and pay very close attention to release notes for relevant changes.

Summary

Initialize the route-pattern matcher before creating a Data Router or static handler with future.unstable_routePatternMatching enabled. Import from react-router/route-pattern and call this once during application startup. Server and browser applications must each preload their own matcher.

The matcher is statically imported by this module. Tree-shaking bundlers can remove it from applications that do not use this function. Initialization is synchronous, and repeated calls are safe.

Signature

function unstable_preloadRoutePattern(): void

Returns

No return value.

Translation © 2026 fanyi.dev · Original © 2026 React Training LLC, Remix Software Inc., Shopify Inc. (MIT)