facebookexperimental / Recoil

Recoil is an experimental state management library for React apps. It provides several capabilities that are difficult to achieve with React alone, while being compatible with the newest features of React.
https://recoiljs.org/
MIT License
19.5k stars 1.18k forks source link

Infinite suspense with async selector on React Native #2274

Open tplorts opened 10 months ago

tplorts commented 10 months ago

I believe this is a regression introduced in 0.7.7 specifically https://github.com/facebookexperimental/Recoil/commit/cff501505dc0491089627622fb1c677dba3c21e1

The problem seems to be that isSSR is evaluating to true in the react native environment, thus executing the this resolver delete statement: https://github.com/facebookexperimental/Recoil/blob/dba6c40b8f2305904abdcacd1f191bc9153812d7/packages/recoil/hooks/Recoil_Hooks.js#L69-L75

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