Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

Infinite suspense with async selector on React Native #2274

Open
tplorts opened this issue Aug 20, 2023 · 0 comments
Open

Infinite suspense with async selector on React Native #2274

tplorts opened this issue Aug 20, 2023 · 0 comments

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant