Answers for "react native programmatically navigate"

0

Programmatically navigate using react router

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

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

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

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

Code answers related to "react native programmatically navigate"

Code answers related to "Javascript"

Browse Popular Code Answers by Language