-
-
Notifications
You must be signed in to change notification settings - Fork 913
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
Fix hydration of suspense fragments that contain text nodes #3287
base: main
Are you sure you want to change the base?
Fix hydration of suspense fragments that contain text nodes #3287
Conversation
/// Create a new meta tag in the head | ||
fn create_meta(&self, props: MetaProps) { | ||
let myself = self.clone(); | ||
queue_effect(move || { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally these would be a default implementation, but it requires a Clone bound on the document trait for queue_effect which is a breaking change
@@ -13,27 +13,26 @@ pub(crate) fn RootScopeWrapper(props: RootProps<VComponent>) -> Element { | |||
None, | |||
TEMPLATE, | |||
Box::new([DynamicNode::Component( | |||
fc_to_builder(ErrorBoundary) | |||
.children(Element::Ok(VNode::new( | |||
fc_to_builder(SuspenseBoundary) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was not causing the hydration error, but putting the error boundary inside the suspense boundary makes it possible to resolve the error on the server without javascript instead of waiting and resolving the error on the client (we added support in #2772, but it is still slower when we can avoid it)
The node walker that hydrates streaming fragments in fullstack was walking some nodes twice which took too many ids off of the stack. This PR fixes that issue and adds more debug information for data hydration failures in debug mode
use_server_future
Hydration error #3041use_server_future
Hydration error #3041Fixes #3041
Fixes #3299