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

86
Views
NextLinkProps specific functionality

I am learning NextLinkProps these days, so I am wondering for the following code, please help me explain next/link's LinkProps build-in function? href={href} means props, that all the links receives href props, but I don't get what does it really mean that all links receive href property. I think I was just confused by the idea of href as props, I mean link is just a link right, people click it, so what is this href property can do with it besides take us to a site? i wish there is an example to show it, it is just a bit abstract. As for {...props}, yeah I get that a tag would receive all the props, if so, why not put {href} also in a tag ?

const Link: React.FC<NextLinkProps & { className?: string }> = ({
  href,
  children,
  ...props
}) => {
  return (
    <NextLink href={href}>
      <a {...props}>{children}</a>
    </NextLink>
  );
};
about 4 years ago · Santiago Gelvez
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!