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

148
Views
react useRef scroll move a specific location

I want to move to the area of my parents when I click on Nav's menu. I think the code is roughly right, but it doesn't work. also, I want to use useRef from react-hooks.

//nav.js
const Nav = ({ moveScroll }) => {

  const handleMove = () => {
    moveScroll.current.scrollIntoView({ behavior: 'smooth' });
  };

  return (
 <Project to='' onClick={handleMove}>PROJECT</Project>
);
}
//app.js
const App = () => {
 const moveScroll = useRef();

return(
<ProjectTitle ref={moveScroll}>Project</ProjectTitle>
);
}
about 4 years ago · Juan Pablo Isaza
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!