Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

285
Visualizações
export 'useNavigation' (imported as 'useNavigation') was not found in 'react-router-dom'

I am trying to import useNavigation from 'react-router-dom'

import { useNavigation } from 'react-router-dom'

however, I get this error:

export 'useNavigation' (imported as 'useNavigation') was not found in 'react-router-dom' (possible exports: BrowserRouter, HashRouter, Link, MemoryRouter, NavLink, Navigate, Outlet, Route, Router, Routes, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, createRoutesFromChildren, createSearchParams, generatePath, matchPath, matchRoutes, renderMatches, resolvePath, unstable_HistoryRouter, useHref, useInRouterContext, useLinkClickHandler, useLocation, useMatch, useNavigate, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRoutes, useSearchParams)

this is depenencies of package.json

"dependencies": {
    "@testing-library/jest-dom": "^5.16.1",
    "@testing-library/react": "^12.1.2",
    "@testing-library/user-event": "^13.5.0",
    "bcrypt": "^5.0.1",
    "bootstrap": "^5.1.3",
    "buffer": "^6.0.3",
    "crypto-js": "^4.1.1",
    "jsonwebtoken": "^8.5.1",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-router-dom": "^6.2.1",
    "react-scripts": "5.0.0",
    "web-vitals": "^2.1.3"
  }
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You spelled the hook wrong!

The correct hook is useNavigate
Though Steve K already replied.
But for further details check this link : https://reactrouter.com/docs/en/v6/api#usenavigate
Those who are looking for similar error Please Check :
1) You spelled right
2) you imported the hook from the right package. For this case it is "react-router-dom"
2) Your import path is ok.
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda