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

107
Vistas
React - change view when we click on img

I woudlike to change a view when I click on my img :

const imageClick = () => {
  console.log('Click');
}

const Next = () => {
  
  return (
        <Heading size="xl" mb="24px">
          <br/>
          <Row>New Feature Launched</Row>
        </Heading>
          <Row><img
            src={img}
            onClick={() => imageClick()}
            loading='lazy'
            alt=''
          /></Row>
        <br/>

I wouldike to go there after clicked : http://localhost:3000/view/1

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Look into a form of routing like react-router-dom

https://reactrouter.com/web/guides/quick-start

Then you can simply use <Link to="/view1">Home</Link>

about 4 years ago · Juan Pablo Isaza Denunciar

0

Look into my experiment

https://codesandbox.io/embed/simple-route-pgxw4?fontsize=14&hidenavigation=1&theme=dark

full sample above is implementation the react route, you can move from View 1 to View 2

about 4 years ago · Juan Pablo Isaza Denunciar
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