With react-router I can use the Link element to create links which are natively handled by react router. I see internally it calls this.context.transitionTo(). I want to do a navigation. …
function HomeButton() {
const navigate = useNavigate();
function click {
navigate("/home");
}
return (
<button type="button"onclick={click} >
Go home
</button>
);
}```
New contributor
Ali Sher is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.