Skip to content

Commit 2e199b7

Browse files
authored
fix resource hydration (#623)
1 parent 6e50e15 commit 2e199b7

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/.dioxus
1010
/target
1111
.DS_Store
12+
._*
1213

1314
.vscode/*
1415
!.vscode/settings.json

packages/docs-router/src/doc_examples/asynchronous.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,12 @@ pub fn CancelSafe() -> Element {
330330

331331
pub fn UseResourceDemo() -> Element {
332332
rsx! {
333-
ComponentWithLogs {
334-
UseResourceMemo {}
333+
// This renders differently based on the number of times we render the component
334+
// which may be different on the client and server so we skip hydration
335+
ClientOnly {
336+
ComponentWithLogs {
337+
UseResourceMemo {}
338+
}
335339
}
336340
}
337341
}

0 commit comments

Comments
 (0)