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
We could use a bit of DRYing up how we set document.title throughout the site. All over the place you'll see things like:
useEffect(()=>{document.title='Some page name - Philanthropy Data Commons';return()=>{document.title='Philanthropy Data Commons';};},[]);
This is using useEffect (the safe place to make DOM edits) to set the document.title on page/component load, then returning an unmount method to restore its former glory.
This should really be something more like setTitle('Some page name') and then resetTitle() at the end.
The text was updated successfully, but these errors were encountered:
We could use a bit of DRYing up how we set
document.title
throughout the site. All over the place you'll see things like:This is using
useEffect
(the safe place to make DOM edits) to set thedocument.title
on page/component load, then returning an unmount method to restore its former glory.This should really be something more like
setTitle('Some page name')
and thenresetTitle()
at the end.The text was updated successfully, but these errors were encountered: