title: How do I make it so each user has its own state?
body: <p>I have a like system similar to Instagram.  The problem's that whenever I like a photo, the <code>currentUserClicks</code> state isn't its own state to all users</p>
  <p>For example: There exists photos A and B.  A has 10 likes B has 20 likes.</p>
  <p>If I click like on photo A, then the like count correctly becomes 11</p>
  <p>Right after, if I click like on photo B, then the like count incorrectly becomes 19 instead of 21</p>
  <p>The <code>currentUserClicks</code> state thinks that photo B should be disliked (decrement the like count by 1 just like Instagram) because <code>currentUserClicks</code> becomes &gt;= 1.</p>
  <p>How can I make it so that each user has its own <code>currentUserClicks</code> value?</p>
  <pre><code>const [currentUserClicks, setCurrentUserClicks] = useState(null);
  
  const handleLikesBasedOnUserId = (likedPhotoUserId) =&gt; {
      if(currentUserClicks &gt;= 1) {
          setCurrentUserClicks(currentUserClicks - 1);
          handleDislike(likedPhotoUserId);
      } else {
          setCurrentUserClicks(currentUserClicks + 1);
          handleLike(likedPhotoUserId);
      }
  };
  </code></pre>