Answers for "uso de useLocation() en react router"

1

usehistory

import { useHistory } from "react-router-";

function HomeButton() {
  let history = useHistory();

  function handleClick() {
    history.push("/home");
  }

  return (
    <button type="button" onClick={handleClick}>
      Go home
    </button>
  );
}
Posted by: Guest on November-23-2020

Code answers related to "uso de useLocation() en react router"

Code answers related to "Javascript"

Browse Popular Code Answers by Language