Hi peeps, I can appreciate this might seem like a ...
# help
j
Hi peeps, I can appreciate this might seem like a nooby question but I am just referring to this part of the guide https://serverless-stack.com/chapters/load-the-state-from-the-session.html I am actually getting a react error for too many re-renders when replicating the guide code used (error occurs at the
setIsAuthenticating(false)
line in the
onLoad
function) and for the life of me cannot work out why, i'm not sure if I need to do some clean up in the
useEffect
hook?
d
Do you have a repo I can look at? I recently referenced this exact part of the docs and didn’t have a problem
f
Thanks @Devin.
Hey @Jack G, yeah if you can share your repo, that’d be great.
j
Unfortunately i'm working from a private repo 😞
f
Hmm.. let me pull in @Jay and see if he can spot something quickly.
j
One thing I could think of is that there are two state variables there https://github.com/serverless-stack/demo-notes-app/blob/main/frontend/src/App.js#L16. Make sure this is setting the right one.
One of them marks the user as authenticated while the other is just set while loading.
j
Ok oddly enough it was my development environment, I was trying to get some work done on a windows system but working from the same branch on a mac it works fine so it's obviously a problem with React / My windows pc
j
That’s pretty weird 🤔