Skip to main content

StaticRouter

还没翻译译自英文(reactrouter.com)本页 15 段都还没译

StaticRouter

Declarative

Summary

Reference Documentation ↗

A <Router> that may not navigate to any other Location. This is useful on the server where there is no stateful UI.

Signature

function StaticRouter({
  basename,
  children,
  location: locationProp = "/",
}: StaticRouterProps)

Props

basename

The base URL for the static router (default: /)

children

The child elements to render inside the static router

location

The Location to render the static router at (default: /)