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

116
Views
React JS wait for useContext change

Hello how to wait for use context change but i create

Component child:

const [weatherInfo, setWeatherInfo] = useState(useContext(WeatherContext)) 

and it return started useContext update, i update him 5seconds from fetch after starting but its not change in component child

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

0

Don't use useState to store the context data if you want to be aware of changes:

const setWeatherInfo = useContext(WeatherContext) 
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!