One button click navigate to route path in reactjs
On click of element if we want to navigate route path-
import { useHistory } from "react-router-dom";<
button onclick="{handleClick}" type="button">
home
</button>
function handleClick() { history.push("/home");
}
Comments