• Preparing search index...
  • The search index is not available
@xarc/react-router
  • @xarc/react-router
  • browser
  • ReactRouterDom
  • useMatch

Function useMatch

  • useMatch<ParamKey, Path>(pattern): PathMatch<ParamKey> | null
  • Returns a PathMatch object if the given pattern matches the current URL. This is useful for components that need to know "active" state, e.g. <NavLink>.

    Type Parameters

    • ParamKey extends string
    • Path extends string

    Parameters

    • pattern: Path | PathPattern<Path>

    Returns PathMatch<ParamKey> | null

    See

    https://reactrouter.com/hooks/use-match

    • Defined in common/temp/node_modules/.pnpm/react-router@6.23.1_react@18.3.1/node_modules/react-router/dist/lib/hooks.d.ts:45

Settings

Member Visibility

Theme

@xarc/react-router
  • Loading...

Generated using TypeDoc