Skip to content
Discussion options

You must be logged in to vote

From what I've gathered from continued exploration, the answer to my question is basically that beforeLoad should be used for auth when we never want the user to hit the page at all while useLayoutEffect can be used when we want the user to hit the page, but redirect ASAP.

Something else I learned along the way is the the reason for useLayoutEffect vs useEffect is what I mentioned, redirecting ASAP vs letting the browser load everything and then do whatever is in the useEffect.

I still don't know why I'm getting crazy redirects lol, but at least I know a little more about what I'm looking at

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by iwilson001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant