title: React: .map is not a function
body: <p>So I am fairly new to react and most of my learning have been by watching tutorial, So at this point, I diverted from my instructor and started implementing it using my own understanding and then I was thrown with following error </p>
  
  <blockquote>
    <p>React: .map is not a function</p>
  </blockquote>
  
  <p>Here is the code </p>
  
  <pre><code>render() {
  
      let person = null;
  
      if (this.state.showPerson) {
        person= (
          &lt;div&gt;
            {
              this.state.person.map((el, index) =&gt; {
                return &lt;Person
                key={el.id}
                click={this.deletePersonHandler.bind(index)}
                name={el.name}
                age={el.age}
                changed={(event) =&gt; this.eventSwitchHandler(event, el.id)} /&gt;
              })
            }
         &lt;/div&gt;
       );
      }
      return (
  </code></pre>
  
  <p>The error occured after I implement eventSwitchHandler, Here is my switch handler code</p>
  
  <pre><code>eventSwitchHandler = (event, id) =&gt; {
  
    const personInput = this.state.person.find(checkID);
  
    function checkID (passedID) {
       return passedID.id === id
      }
      console.log("newP")
      const newP = {...personInput}
      console.log(newP)
      newP.name = event.target.value
      console.log(personInput)
      this.setState ({person: newP})
    }
  </code></pre>
  
  <p>[Updated] Here is State</p>
  
  <pre><code>state = {
      person: [
      {id: "name1n", name: "Rohit", age: 24},
      {id: "name2l", name: "Hariom", age: 23},
      {id: "name3g", name: "Vaibhav", age: 58}
    ],
    someOtherState: "Untouched state",
    showPerson: false
  }
  </code></pre>
  
  <p>[Update] Here is my instructor code, His name change handler is equal to my eventSwitchHandler </p>
  
  <p><a href="https://i.stack.imgur.com/1gAle.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1gAle.jpg" alt="enter image description here"></a>
  Again, My first question would be why does <code>.map is not a function</code> error occurs and while console.logging stuff, I observed something which is kinda rare to me for which I have attached a screenshot (<strong>why does the name appear to be different in both the places?)</strong></p>
  
  <p><a href="https://i.stack.imgur.com/LoxhG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LoxhG.png" alt="enter image description here"></a></p>