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

103
Views
React updateing states

i am trying to create a reSize for my pixel art grid the problem is that setSize is not ready yet when i am rendering location i'm in do you know how can i deley setOcells till its done?

const reSize = (e) =>{
    console.log(e.deltaY)
    var newSize = size+e.deltaY
      if (newSize>=10 && newSize<101) {
        setSize(newSize)
      }  
      if (newSize<10){
        setSize(10)
      }
      if (newSize>100){
        setSize(100)
      }
      setOCells(renderLocation(location[0],location[1]));
    
      setCells(oCells);
      setChanges([]);
  }
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!