Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rn-expo): fixes error/warning when the call is left in expo [skip ci] #1631

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

kristian-mkd
Copy link
Contributor

@kristian-mkd kristian-mkd commented Dec 26, 2024

Overview

Fixes the error/warning generated when user is leaving a call in our sample expo app.

 ERROR  Warning: Cannot update a component (ForwardRef(BaseNavigationContainer)) while rendering a different component (JoinMeetingScreen). To locate the bad setState() call inside JoinMeetingScreen, follow the stack trace as described in https://reactjs.org/link/setstate-in-render

The issue was in our JoinMeetingScreen component - it's trying to update state during render.

Solution: Move the navigation logic into an effect:

@kristian-mkd kristian-mkd changed the title fixes error/warning when the call is left in expo fix(rn-expo): fixes error/warning when the call is left in expo [skip ci] Dec 26, 2024
@kristian-mkd kristian-mkd changed the title fix(rn-expo): fixes error/warning when the call is left in expo [skip ci] fix(rn-expo): fixes error/warning when the call is left in expo Dec 26, 2024
@kristian-mkd kristian-mkd changed the title fix(rn-expo): fixes error/warning when the call is left in expo fix(rn-expo): fixes error/warning when the call is left in expo [skip ci] Dec 26, 2024
@kristian-mkd kristian-mkd merged commit 561802f into main Dec 26, 2024
6 of 7 checks passed
@kristian-mkd kristian-mkd deleted the expo-leave-call-fix branch December 26, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants