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

181
Views
useEffect const declarations require an initialization value

I have some code inside of a useEffect hook, and am getting an error in my codesandbox saying const declarations require an initialization value.

I understand most times this means there is code following a return statement, but that's not the case here. I can't seem to figure out what the problem is.

Any help appreciated. Link to sandbox: link

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

0

You need to add a closing-curly bracket on line 19. Since it's missing, it's not executing the rest of the useEffect hooks callback.

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!