Describe the bug
Error thrown by async read in is not captured by a wrapping
<div>
A <Loading fallback={()=>"Loading...1"}>
<Errored fallback={()=>"Error 1"}>{asyncMemo()}</Errored>
</Loading>
</div>
<hr />
<div>
B <Errored fallback={()=>"Error 2"}>
<Loading fallback={()=>"Loading...2"}>
{asyncMemo()}
</Loading>
</Errored>
</div>
Your Example Website or App
https://s.olid.uk/id/u7y7YIokR4m6nTge0V5B2w
Steps to Reproduce the Bug or Issue
case 2 is a control case, where both cases actually works more as expected and shows the errored fallback.
/**
* Case 1:
* refresh preview
*
* 1. wait for initial load
* A Loading...1 => A 0
* B Loading...2 => B 0
*
* 2. click The button once
* Expected:
* A 0 => Error 1
* B 0 => Error 2
*
* Actual :
* A 0 => Error 1
* B 0 => 0
* Console logs:
* ✖ ERRRR
*
* in this case only the first case went through the fallback.
*
* Case 2
* refresh preview
* 1. click the button once before the promise resolve
*
* render will change from => to
* A Loading...1 => A Error 1
* B Loading...1 => B Error 2
* Console logs:
* ✖ ERRRR
* ✖ ERRRR
*
* In this case both fallbacks worked
*
*/
Expected behavior
both <Errored><Loading>{asyncReadThatErrors()}</Loading></Errored>
and <Loading><Errored>{asyncReadThatErrors()}</Errored></Loading>
should fallback to error if there was an error in the async read.
Screenshots or Videos
No response
Platform
.
Additional context
verify that this is fixed by recent related fixes
#2809
Describe the bug
Error thrown by async read in is not captured by a wrapping
Your Example Website or App
https://s.olid.uk/id/u7y7YIokR4m6nTge0V5B2w
Steps to Reproduce the Bug or Issue
case 2 is a control case, where both cases actually works more as expected and shows the errored fallback.
Expected behavior
both
<Errored><Loading>{asyncReadThatErrors()}</Loading></Errored>and
<Loading><Errored>{asyncReadThatErrors()}</Errored></Loading>should fallback to error if there was an error in the async read.
Screenshots or Videos
No response
Platform
.
Additional context
verify that this is fixed by recent related fixes
#2809