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

376
Views
Error: Maximum update depth exceeded. React limits the number of nested updates to prevent infinite loops

Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

I have made a component in react JS which is returning the color name. I just want to store that color name in my parent component , so how can I do this ?

here is my code line which is creating error :

{this.setState({navColor: <ChangeNavColor stage={this.state.Stage}/>})}

or is there any another way that I can store this component return value in a variable and that variable I will assign to this "navColor" state ?

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

0

you need to call function :

{()=>this.setState({navColor: <ChangeNavColor stage={this.state.Stage}/>})}
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!