Manage logged in and anonymous users in app #811
Unanswered
juanisimioli
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Issue: Intermittent app crashes when accessing messages after login transition with React Use Intercom
Problem Description
I'm using
react-use-intercom
to handle different user states (logged in vs anonymous). I have anIntercomManager
component that initializes Intercom based on the user's authentication state.Current Implementation
Provider Setup
Expected Behavior
Actual Behavior (Intermittent Issue)
Issue Frequency
Video Demonstration
I've attached a video that clearly shows the issue:
Screen.Recording.2025-05-28.at.2.08.30.PM.mov
This behavior strongly suggests the issue is related to the state transition rather than the configuration itself, since a hard refresh with the same logged-in user works fine.
Questions
boot()
every time I want to set a different user type?shutdown()
at the beginning of the useEffect before callingboot()
?Additional Context
userData
returns user data when logged in, andnull
when logged outshutdown()
at the beginning of the useEffectAny guidance on the proper way to handle this user state transition consistently would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions