本页还没有译文
本页 13 段还没译成简体中文,下面显示的是英文原文。useMatch
还没翻译译自英文(reactrouter.com)本页 13 段都还没译
useMatch
Framework Data Declarative
Summary
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>.
Signature
function useMatch<Path extends string>(
pattern: PathPattern<Path> | Path,
): PathMatch<ParamParseKey<Path>> | nullParams
pattern
The pattern to match against the current Location
Returns
The path match object if the pattern matches, null otherwise
AI 翻译查看英文原文