Properly implement wait_for_suspense
Wait_for_suspense now does not call flush_sync, making it appropriate for deferring effects on the server. Futures will still run on the server (as needed to progress suspense) but use_effect / and memo watchers will not run on the server
This commit is contained in:
11 files changed
+156
-86
No files matched your search
@@ -57,6 +57,11 @@ impl VirtualDom {
|
||||
|
||||
let context = scope.state();
|
||||
|
||||
// Run all post-render hooks
|
||||
for post_run in context.after_render.borrow_mut().iter_mut() {
|
||||
post_run();
|
||||
}
|
||||
|
||||
// And move the render generation forward by one
|
||||
context.render_count.set(context.render_count.get() + 1);
|
||||
|
||||
|
||||
Reference in new issue
Block a user