title: react hook useEffect throwing Assignment to const variable error
body: <p>I am working on some code, and I am stuck on this error.  I have not seen it come up before in my other projects, and so I am not sure why it is here.  I am using the useEffect hook, and I want to update it when a user chooses an option from a drop down.  What happens is that when a user chooses an option, i get the following error <code>TypeError: Assignment to constant variable.</code>.  I understand that it is saying that I am trying to update a constant which cant happen, but I dont get why.
  Unfortunalty, </p>
  
  <p>I can not determine how to properly render my code, but the next two lines are the lines of code that I am having the issue with.  These are then followed by the full code that I am working on.</p>
  
  <p><code>const [TitleId, setTitleId] = useState(0);</code> <code>const TitleSelect = event =&gt;{
          console.log(event.target.value);
          setTitleId=(32);
      };</code></p>
  
  <pre><code>import React, {useState,useEffect} from 'react';
  // import '../app.css';
  
  const Header = props=&gt; {
  const [TitleList, setTitleList] = useState([]);
  const [TitleId, setTitleId] = useState(0);
  
  useEffect(()=&gt;{
      console.log('first start');
      setTitleList(
          props.data.map((title,index)=&gt;({
              title: title.title,
              id: index
          }))
      )
  },[])
  const TitleSelect = event =&gt;{
      console.log(event.target.value);
      setTitleId=(32);
  };
  
  let content = (
      &lt;select
      onChange={TitleSelect}&gt;
      {TitleList.map(title=&gt;(
          &lt;option key={title.id} value={title.id}&gt;
                  {title.title}
                  &lt;/option&gt;
      ))}
  
      &lt;/select&gt;)  
  return(content);
  }
  export default Header;
  </code></pre>
  
  <p>Any suggestions or advice is greatly appreciated.</p>