Type Alias: SolidRouterHooks
API / @xmachines/play-solid-router / SolidRouterHooks
type SolidRouterHooks = object;Defined in: packages/play-solid-router/src/play-router-provider.tsx:37
The three results of the Solid Router hooks that PlayRouterProvider and
SolidRouterBridge need. Give them directly from the hook calls of your component:
const navigate = useNavigate(); // → SolidRouterHooks.navigateconst location = useLocation(); // → SolidRouterHooks.locationconst params = useParams(); // → SolidRouterHooks.paramsnavigate— the bridge pushes each URL change with it, when thecurrentRouteof the actor changes.location— the bridge readspathnameandsearchat the moment ofconnect(), for a deep link. Each later change of the pathname then goes to the actor, throughcreateEffect.params— the path parameters of the current route segment, which Solid parsed already. The bridge uses them directly inextractParams(), and it parses them not again with URLPattern.
Properties
location
location: Location;Defined in: packages/play-solid-router/src/play-router-provider.tsx:39
navigate
navigate: Navigator;Defined in: packages/play-solid-router/src/play-router-provider.tsx:38
params
params: Params;Defined in: packages/play-solid-router/src/play-router-provider.tsx:40