Open DonAlonzo opened 6 days ago
During suspense, the server gradually hands off control for part of the tree to the client. Once part of the tree is resolved, that part of the tree can no longer be updated because it will either lose client state or cause a hydration mismatch. In the code you posted, the suspense boundary throws an error up into an error boundary that is already resolved. Swapping the suspense and error boundaries fixes the issue because the error boundary is moved into a part of the tree that is not resolved. Then when the suspense throws an error, it updates the unresolved part of the tree on the server and resolves suspense
Problem
The following code produces an unwrap error:
Running it gives the following error:![image](https://github.com/DioxusLabs/dioxus/assets/4115681/fe5eebd1-530c-4a02-9003-54638e857a14)
Changing Home to this code, however, works:
The error can't bubble through the SuspenseBoundary correctly.
Environment:
master
v1.81.0-nightly
Arch Linux
fullstack
Questionnaire