| useInRouterContext | R Documentation |
https://api.reactrouter.com/v7/functions/react-router.useInRouterContext.html
useInRouterContext(into = NULL, as = "children", render = NULL, ...)
into |
A component (HTML tag or shiny.react-based element) that will receive the hook value as the specified prop. |
as |
Character. The name of the component's prop to inject the hook
value into. Defaults to |
render |
Optional |
... |
Additional props to pass to the component. |
Calls the useInRouterContext() hook and injects the boolean result
as a prop of the into component. Useful inside reusable
components that may be rendered with or without a surrounding router –
guard router-only logic with this check before calling other hooks.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.