MCPcopy
hub / github.com/molefrog/wouter / useRoute

Function useRoute

packages/wouter/src/index.js:137–138  ·  view source on GitHub ↗
(pattern)

Source from the content-addressed store, hash-verified

135};
136
137export const useRoute = (pattern) =>
138 matchRoute(useRouter().parser, pattern, useLocation()[0]);
139
140/*
141 * Part 2, Low Carb Router API: Router, Route, Link, Switch

Callers 6

parser.test.tsxFile · 0.90
use-route.test.tsxFile · 0.90
assertRouteFunction · 0.90
HookRouteFunction · 0.90
ComponentFunction · 0.85

Calls 3

matchRouteFunction · 0.85
useRouterFunction · 0.85
useLocationFunction · 0.85

Tested by 3

assertRouteFunction · 0.72
HookRouteFunction · 0.72
ComponentFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…