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

106
Views
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 answers
Answer question

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 Report

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 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!