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

170
Vistas
is there any way we can use button instead of link to redirect on different path
import React, { Component } from 'react'
import { Link  } from 'react-router-dom'
export class Temp extends Component {

    
  render() {
    const RedirectFunc = () =>{
        // Logic to redirect to cart page

        // Some other login i want to use before the page gets changed thats why i cant use Direct link
        console.log("I got click")
     }
        
    return (
      <div>
        <button onClick={()=>{RedirectFunc()}}></button>
      </div>
    )
  }
}

export default Temp

How can i redirect my self to a page using a onclick functionality in react class based componenet the reason why i cant use Link is that i had to do some other logics as well before i move to other page

about 4 years ago · Santiago Gelvez
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