Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

React useEffect, useState

function useFriendStatus(friendID) {
  const [isOnline, setIsOnline] = useState(null);

  // ...

  return isOnline;
}
Source by reactjs.org #
 
PREVIOUS NEXT
Tagged: #React #useState
ADD COMMENT
Topic
Name
4+1 =