Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

268
Views
history parameter has been removed from router in version 6.2.1?

I'm trying to use createMemoryHistory on the router and I'm getting the typescript error :{

the code is this and the message is in the image..

import { Router } from 'react-router-dom'
import { createMemoryHistory } from 'history'

const history = createMemoryHistory()

const makeSut = () => {
  const sut = render(
    <Router history={history}>
      <Login />
    </Router>
  )
}

enter image description here

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

It is no longer needed to create the history object yourself. Use the BrowserRouter component instead or the Router component

about 4 years ago · Juan Pablo Isaza Report

0

the test I'm doing is on the object's history,

I found this solution

<Router navigator={history} location={history.location}>
...
</Router>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!