useInRouterContext

useInRouterContext

Type declaration
declare function useInRouterContext(): boolean;

The useInRouterContext hooks returns true if the component is being rendered in the context of a <Router>, false otherwise. This can be useful for some 3rd-party extensions that need to know if they are being rendered in the context of a React Router app.

Docs and examples CC 4.0