You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can replace .then with await and put a resolved promise in a variable instead. there's a catch with useEffect which is they don't like async functions so you can wrap it. here's what that looks like (without comments), from home-page.js:
Also whilst we're here, I would recommend using a more specific dependency for this effect, i.e. user.uid. Since you want to limit how often it runs as a main page. That being said, there aren't currently many changes to user so it's not a huge deal.
The text was updated successfully, but these errors were encountered:
You can replace
.then
withawait
and put a resolved promise in a variable instead. there's a catch withuseEffect
which is they don't likeasync
functions so you can wrap it. here's what that looks like (without comments), fromhome-page.js
:Also whilst we're here, I would recommend using a more specific dependency for this effect, i.e.
user.uid
. Since you want to limit how often it runs as a main page. That being said, there aren't currently many changes touser
so it's not a huge deal.The text was updated successfully, but these errors were encountered: