Failing test related to usage of Suspense and Context in memoized component#18572
Failing test related to usage of Suspense and Context in memoized component#18572Tsdevendra1 wants to merge 4 commits into
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 488ae4c:
|
|
Ah nice test case! Confirmed this is a bug in "legacy" mode Suspense. I checked, and the test passes in Concurrent Mode. (If you have a Concurrent Mode test case, please let me know.) Note that technically, in outside of Concurrent Mode, we don't officially support suspending except for |
|
It's essentially the same bug that we fixed here for classes: Need to decide on least bad way to fix it. My initial instinct is a special effect tag that prevents a bail out ( Then we would add that check to this condition here, to prevent us from setting |
|
Hi @acdlite, I've added a test case for the concurrent mode which passes. I'll have a go at implementing the solution you outlined and getting back to you. |
|
I think I'm a bit stuck on this or maybe I didn't understand what you suggested properly. When I try to enqueue a On a separate note, there seem to be .old and .new versions of some files, should I be modifying both or just one? I asked because when I build my local react using |
|
If you don't plan to keep working on this, would you mind keeping the failing test open as a reminder? |
|
This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated. |
|
Superseded by #19216. |
Failing test as requested related to #17356.
This is a failing test which shows that when useContext and throwing a promise are used in a memoized component, it fails to update after the promise has resolved.