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

Infinite suspense with async selector on React Native #2274

Open
tplorts opened this issue Aug 20, 2023 · 0 comments · May be fixed by #2275
Open

Infinite suspense with async selector on React Native #2274

tplorts opened this issue Aug 20, 2023 · 0 comments · May be fixed by #2275

Comments

@tplorts
Copy link

tplorts commented Aug 20, 2023

I believe this is a regression introduced in 0.7.7 specifically cff5015

The problem seems to be that isSSR is evaluating to true in the react native environment, thus executing the this resolver delete statement:

// SSR should clear out the wake-up resolver if the Promise is resolved
// to avoid infinite loops. (See https://github.com/facebookexperimental/Recoil/pull/2073)
if (isSSR && isPromise(loadable.contents)) {
loadable.contents.finally(() => {
suspendedComponentResolvers.delete(resolve);
});
}

Not sure if that's a new thing - I was just trying this out with react-native 0.72.3 so that may be due to a recent change in react native.

PR coming in a moment

@tplorts tplorts linked a pull request Aug 20, 2023 that will close this issue
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 a pull request may close this issue.

1 participant