title: TypeError: AddTag is not a function
body: <p>I'm trying to add a tag user inputs to an existing list of tags but I keep getting TypeError. Here is a simple version of the code. I created the addTag in the App.js file and called it in the Profil.js</p>
  <p><strong>In the App.js</strong></p>
  <pre><code>import tag from './tag.json'
  
  const [tagList, setTagList] = useState(tag);
  const addTag = (tagInput) =&gt; {
        console.log(&quot;adding..&quot;)
        const newTag = { id : Date.now(), tag: tagInput}
        setTagList([...tagList,newTag])
        console.log(&quot;added..&quot;)
      }
  
  return (
            &lt;Profile key={e.id} name={e.name} username={e.username} email={e.email} website={e.website} company={e.company.name}
            street={e.address.street} suite={e.address.suite} city={e.address.city} zipcode={e.address.zipcode} 
            addTag={addTag} /&gt; )
  </code></pre>
  <p><strong>In Profile.js</strong></p>
  <pre><code>const Profile = (user,{addTag}) =&gt; {
  const [tagInput, setTagInput] = useState('')
  const handleChange = (e) =&gt; {
          setTagInput(e.currentTarget.value)
      }
  
      const handleSubmit = (e) =&gt; {
          e.preventDefault()
          addTag(tagInput)
          setTagInput(&quot;&quot;)
      }
  return (
  &lt;div className=&quot;search&quot;&gt;
                      &lt;input type=&quot;text&quot; placeholder=&quot;Add a tag&quot; value={tagInput} onClick={()=&gt;{
                          setCancelTag(!cancelTag)
                          console.log(&quot;search enabled&quot;)
                      }} onChange={handleChange} /&gt;
                      {cancelTag? null : &lt;button className=&quot;cancel-tag&quot; onClick={handleSubmit} &gt;&amp;times;&lt;/button&gt;}
                  &lt;/div&gt;
  }
  </code></pre>