buildspace / buildspace-projects

The home of our open-source projects.
https://buildspace.so/projects
Creative Commons Attribution Share Alike 4.0 International
3.01k stars 1.09k forks source link

Add useEffect hook for address #1601

Closed alymurtazamemon closed 1 year ago

alymurtazamemon commented 1 year ago

We should add here the useEffect hook for the address so that our web application can update the state accordingly whenever the user connects and disconnects the wallet.

// Use the hooks thirdweb give us.
  const address = useAddress();
  console.log("👋 Address:", address);

  useEffect(() => {}, [address]);
helloitsm3 commented 1 year ago

This doesn't really make much sense. useAddress is already a hook which will trigger a re-render every time there's an update so there's no reason why you need to have a useEffect in here