useInRouterContext

Returns true if this component is a descendant of a <Router>.

See also

https

://reactrouter.com/hooks/use-in-router-context