Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

useChangeRoute

DanilAndreev edited this page Jul 6, 2020 · 3 revisions

useChangeRoute

useChangeRoute() - is a ReactJS hook, used to get changeRoute(), getRouteParams(), homePath from every component.
Hook should be used in components, which stand after <ChangeRouteProvider />

Content

More info

Fro more information about ReactJS hooks see react hooks

Example

function MyComponent() {
    const {changeRoute, getRouteParams, homePath} = useChangeRoute();
    return(
        ...
    );
}