Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

react-router-dom

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

function Locaions() {

  let location = useLocation();

  return (
    <>
    {location.pathname === "/Home" ?
    "Hi i am at the homepage"
    :
    "d-none"
    }
    </>
  );
}
Source by www.github.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
2+1 =