Replies: 1 comment
-
Hi @Kein1945, have you seen #1345. I think the issues are related. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've started to learn recoil and tried to create simple app with authentication.
But when I've tried to build application I've got white screen. No errors, No react components. Nothing. I've started to debug line by line and found that my example make atom loadable. When application start renders it's stops after
const user = useRecoilValue(userState);
and go nowhere. Nothing happens. Because atom become to 'loading' state and nothing is change, because application can't render Login component that responsible to setUser in that case.I've fixed that by adding
else { setSelf(null) }
in localStorage example.I'm not sure is it correct way.
In my case I've set user in component after authorization.
And maybe need to fixed that moment in documentation to avoid spending time in debug for new comers.
Beta Was this translation helpful? Give feedback.
All reactions