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(router): infinite renders when using nested boundaries #24317

Merged
merged 3 commits into from
Sep 11, 2023

Conversation

marklawlor
Copy link
Contributor

Why

#24185 (comment)
#24242

How

The qualified route component component loading is slightly unstable, as it calls fromLoadedRoute every render. Normally this isn't an issue, as routes typically return a stable component (the default export), but when using an ErrorBoundary, this becomes non-stable.

Test Plan

Checklist

@expo-bot expo-bot added bot: suggestions ExpoBot has some suggestions bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Sep 7, 2023
@marklawlor marklawlor force-pushed the marklawlor/router/errorboundary-infinite-render branch from 557a302 to a0eca5a Compare September 11, 2023 07:39
@marklawlor marklawlor marked this pull request as ready for review September 11, 2023 07:39
@EvanBacon EvanBacon merged commit 80dc067 into main Sep 11, 2023
9 checks passed
@EvanBacon EvanBacon deleted the marklawlor/router/errorboundary-infinite-render branch September 11, 2023 18:09
alanjhughes pushed a commit that referenced this pull request Sep 14, 2023
# Why

#24185 (comment)
#24242

# How

The qualified route component component loading is slightly unstable, as
it calls `fromLoadedRoute` every render. Normally this isn't an issue,
as routes typically return a stable component (the `default` export),
but when using an ErrorBoundary, this becomes non-stable.

# Test Plan


# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants