“React-Router-Dom” Respostas de código

React-Router-Dom

$ npm install --save react-router-dom
Enthusiastic Elephant

React-Router-Dom

npm install react-router-dom
Roseat Flamingo

React-Router-Dom

npm install react-router-dom
Upset Unicorn

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"
    }
    </>
  );
}
Didi Abel

React-Router-Dom

npm i @types/react-router-dom
Enchanting Elephant

React-Router-Dom

import * as React from "react";
import * as ReactDOM from "react-dom";
import { BrowserRouter } from "react-router-dom";
import "./index.css";
import App from "./App";
import * as serviceWorker from "./serviceWorker";

ReactDOM.render(
  <BrowserRouter>
    <App />
  </BrowserRouter>,
  document.getElementById("root")
);
Aggressive Alpaca

Respostas semelhantes a “React-Router-Dom”

Perguntas semelhantes a “React-Router-Dom”

Procure respostas de código populares por idioma

Procurar outros idiomas de código