Created
December 30, 2022 22:56
-
-
Save kivircik-parantez/085c0cedc07d343f27639a2b1a2372cf to your computer and use it in GitHub Desktop.
Only runs once per app load
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof window !== 'undefined') { // Check if we're running in the browser. | |
// ✅ Only runs once per app load | |
checkAuthToken(); | |
loadDataFromLocalStorage(); | |
} | |
function App() { | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment