Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

230
Vistas
React - history push throwing error: Failed to execute 'pushState' on 'History'

I have a page on the URL:http://localhost:10001/track/8311c15a-7f7f-47ff-b81a-6f6904ad191c/my-form where I have a form. After the form is submitted I am using react's router history to redirect to a success page

const MyComponent = ({match, location, history}: RouteComponentProps

const onSubmit = () => {
  history.push(`/${baseUrl}/success`)
}

But, when I try to do so, I get an error:

Uncaught DOMException: Failed to execute 'pushState' on 'History': A history state object with URL 'http://track/8311c15a-7f7f-47ff-b81a-6f6904ad191c/success' cannot be created in a document with origin 'http://localhost:10001' and URL 'http://localhost:10001/track/8311c15a-7f7f-47ff-b81a-6f6904ad191c/my-form'.

It is the first time I have encountered this error. What am I doing wrong here?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda