I am building a React JS app and was wondering what is the difference between returning:
<Link to={"/path"}><button>text</button></Link>
and setting
const history = useHistory();
const handleClick = () => {
history.push("/path");
}
to return
<button onClick={handleClick}>text</button>
Cheers