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
Error: SearchBox(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null
class App extends Component{

  // whatever written inside the constructor can be accessed anytime (properties)
  constructor(){
    super(); //it calls constructor method on component class

    this.state = {
      monsters: [],
      searchField: ''
    }

      }

 

     componentDidMount(){
        fetch('https://jsonplaceholder.typicode.com/users')
        .then(response => response.json())
        .then(users => this.setState( {monsters : users}))
      }

 

     render(){

    const { monsters, searchField} = this.state ;

    const filteredMonster = monsters.filter(monster => 
        monster.name.toLowerCase().includes(searchField.toLowerCase())
      );

    return (

      <div className= "App">

      <SearchBox 
        placeholder = 'Search monsters'
        handleChange = { 
          e => this.setState({ searchField: e.target.value})
        }/>

 

         <CardList monsters = {filteredMonster}/>
            {/**map returns fn iterated over all the elments present inside the object, in this case monsters. */}
        </div>
        );   
      }
    }
    export default App;

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!