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

501
Views
Button to be clicked and routed to another page in React
 <button component={Link} to={"/create"}>
      <EditIcon></EditIcon>
 </button>

This is my code to make an icon a clickable button that routes to the page "create." The button is not performing any function. Can anyone help me out?

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

0

 <Link to={"/create"}
      <EditIcon />
 </Link >

and dont forget to import it from react-router-dom

import {Link} from "react-router-dom"

about 4 years ago · Juan Pablo Isaza Report

0

import { useHistory } from "react-router-dom";
const Button = ()=>{
let history = useHistory();
return(<>
<EditIcon onClick={()=>history.push("/create");}/>
</>

)}
export default Button;

here u can learn about react router from this link

https://v5.reactrouter.com/web/api/Hooks

about 4 years ago · Juan Pablo Isaza Report

0

`import {useNavigate} from 'react-router-dom

const navigate = useNaviagte()

<button onClick={()=>navigate("/create")}> `

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!