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

171
Views
Intento de error de importación: 'withRouter' no se exporta desde 'react-router'

Este es el código que estoy usando para una pantalla de registro usando React:

 import React, { useCallback } from "react"; import { withRouter } from "react-router"; import app from "../Firebase/firebase"; const Register = ({history}) => { const handleSignup = useCallback(async event => { event.preventDefault() const { email, password } = event.target.elements; try { await app .auth() .createUserWithEmailAndPassword(email.value, password.value); history.push("/dashboard") } catch(error) { alert(error) } }, [history]); return ( <div> <p>Register</p> <Form onSubmit={handleSignup}> <label> Email <input name="email" type="email" placeholder="Email" /> </label> <label> Password <input name="password" type="password" placeholder="Password" /> </label> <button type="submit">Register</button> </Form> </div> ) } export default withRouter(Register)

Recibo el error mencionado en el título, ¿qué estoy haciendo mal aquí?

También recibo estos errores cuando npm i react-router en la terminal: npm WARN @babel/plugin-bugfix-v8-spread-parameters-in-opcional-chaining@7.16.0 requiere un par de @babel/core @^7.13.0 pero ninguno está instalado. Debe instalar las dependencias de pares usted mismo.

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

0

necesita degradar react-router y react-router-dom a la versión 5.

 npm install react-router@5 npm install react-router-dom@5

No creo que Cube.js se mantenga más. Probablemente sea mejor encontrar una plataforma diferente.

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!