-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Bug: SuspenseList crash #20932
Comments
gaearon
added
Status: Unconfirmed
A potential issue that we haven't yet confirmed as a bug
Component: Concurrent Features
Type: Bug
and removed
Status: Unconfirmed
A potential issue that we haven't yet confirmed as a bug
labels
Mar 5, 2021
i think it's because , you had thrown a promise object in function read(i) {
if (cache[i]) {
if (cache[i].result) {
return cache[i].result;
} else {
// *** HERE ****
throw cache[i].promise;
}
}
cache[i] = {
promise: new Promise((resolve) => {
setTimeout(() => {
cache[i].result = "foo";
resolve();
}, 1000);
})
};
// *** and HERE ****
throw cache[i].promise;
} it interrupt your ideal rendering. and the error thrown by React in browser means that there isn't an fiberRoot could be founded |
acdlite
added a commit
to acdlite/react
that referenced
this issue
Mar 5, 2021
Based on facebook#20932 Co-Authored-By: Dan Abramov <dan.abramov@gmail.com>
This was referenced Mar 5, 2021
acdlite
added a commit
that referenced
this issue
Mar 7, 2021
* Add failing regression test Based on #20932 Co-Authored-By: Dan Abramov <dan.abramov@gmail.com> * Reset `subtreeFlags` in `resetWorkInProgress` Alternate fix to #20942 There was already a TODO to make this change, but at the time I left it, I couldn't think of a way that it would actually cause a bug, and I was hesistant to change something without fully understanding the ramifications. This was during a time when we were hunting down a different bug, so we were especially risk averse. What I should have done in retrospect is put the change behind a flag and tried rolling it out once the other bug had been flushed out. OTOH, now we have a regression test, which wouldn't have otherwise, and the bug it caused rarely fired in production. Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
koto
pushed a commit
to koto/react
that referenced
this issue
Jun 15, 2021
* Add failing regression test Based on facebook#20932 Co-Authored-By: Dan Abramov <dan.abramov@gmail.com> * Reset `subtreeFlags` in `resetWorkInProgress` Alternate fix to facebook#20942 There was already a TODO to make this change, but at the time I left it, I couldn't think of a way that it would actually cause a bug, and I was hesistant to change something without fully understanding the ramifications. This was during a time when we were hunting down a different bug, so we were especially risk averse. What I should have done in retrospect is put the change behind a flag and tried rolling it out once the other bug had been flushed out. OTOH, now we have a regression test, which wouldn't have otherwise, and the bug it caused rarely fired in production. Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://codesandbox.io/s/nostalgic-frost-53gys?file=/src/App.js
The text was updated successfully, but these errors were encountered: