Describe the bug
- When reading a reactive value that throws, the error propagate to dependents and dependents are marked with
STATUS_ERROR without re-running dependent compute functions. So even if a dependent compute function handles the error, it is still marked as errored.
- Reads inside async memo compute fn, after recovered from the error, are stale.
Your Example Website or App
https://stackblitz.com/edit/nitrojs-nitro-1w8mivtu?file=src%2FApp.tsx
Steps to Reproduce the Bug or Issue
- Go to the example
- Click Increment, both
syncDerived and syncDerivedStringified errored, async* doesn't update.
- Click Increment again,
sync* recovers, async* errored with stale reads.
Expected behavior
Errors should not propagate to dependents directly but go through dependent compute functions to allow error handling.
If the current behavior is by design, then how can I depend on a reactive value without the risk of error propagating? For example, disabling a reset button when resetting, inside <Errored fallback>:
<Errored fallback={(err, reset) => <button onClick={reset} disabled={isPending(data)}>Reset</button>}>
...
</Errored>
Screenshots or Videos
No response
Platform
Any
Additional context
Relevant discussion: #2791
Describe the bug
STATUS_ERRORwithout re-running dependent compute functions. So even if a dependent compute function handles the error, it is still marked as errored.Your Example Website or App
https://stackblitz.com/edit/nitrojs-nitro-1w8mivtu?file=src%2FApp.tsx
Steps to Reproduce the Bug or Issue
syncDerivedandsyncDerivedStringifiederrored,async*doesn't update.sync*recovers,async*errored with stale reads.Expected behavior
Errors should not propagate to dependents directly but go through dependent compute functions to allow error handling.
If the current behavior is by design, then how can I depend on a reactive value without the risk of error propagating? For example, disabling a reset button when resetting, inside
<Errored fallback>:Screenshots or Videos
No response
Platform
Any
Additional context
Relevant discussion: #2791