title: add items to another list and remove from there with React
body: <p>I am newbie in React js. I am trying to do Pokedex app. I was able to fetc data via Api list them. And I made  detail page  for each pokemon. In this detail page I have one button  to favorite this pokemon and move it to favorite list and show it when I clicked favorites in navbar. I want to see it. Also I will do the opposite of it (remove from favorites).  I have been trying for almost 3 days and I am so confused. Please it is really import for me. I am not sure what cıde should I add, So I am giving my project link. Please guide me. Thanks in advance.</p>
  <p>pokemonFav.js</p>
  <pre><code> function PokemonFav(){
   const [fullList, setFullList] = useState([])
   const [favList, setFavList] = useState([]) 
  
   const handleFavAddClick=(e)=&gt;{
       setFavList(preState=&gt;[...preState, e])
       setFullList(preState=&gt; preState.filter(item =&gt; item !== e))
   }
  
  
   return(
       &lt;div&gt;
           Full List
           &lt;ul&gt;
            {
                fullList.map(e=&gt; &lt;li key={e} onClick={()=&gt;handleFavAddClick(e)}&gt;{e}&lt;/li&gt;)
            }
           &lt;/ul&gt;
  
           Fav List
           &lt;ul&gt;
            {
                favList.map(e=&gt; &lt;li key={e}&gt;{e}&lt;/li&gt;)
            }
           &lt;/ul&gt;
       &lt;/div&gt;
   )
  }
    export default PokemonFav;
  </code></pre>
  <p>pokemoncard.js
  I added the button here and call the handlefavadclick function
  like so</p>
  <pre><code>   &lt;button  key={e} onClick={()=&gt;handleFavAddClick(e)}&gt;{e}&lt;/button&gt; 
  </code></pre>
  <p><a href="https://github.com/yasoyase/Pokedex-app" rel="nofollow noreferrer">https://github.com/yasoyase/Pokedex-app</a></p>