Closed Silvea12 closed 3 months ago
I cannot reproduce this issue with dioxus 0.5.0
or the latest commit of the main branch of dioxus: https://github.com/ealmloff/reproduce-dioxus-fullstack-2193
The page takes 1 second to reload, but does not reload in a loop
I can reproduce it with your demo. See the attached video. Screencast_20240402_021207.webm
... Strange github didn't embed this, I thought it did.
Problem
When refreshing your app with fullstack and a
use_server_future()
with a?
to suspend as per the docs, when using tokio sleep, the page infinitely reloads.Steps To Reproduce
Steps to reproduce the behavior:
use_server_future(my_server_fn)?;
in a component. No need to actually use the value.See this in the server logs:
Logs
The blank line here is every time it pauses for the sleep. ``` [INFO] dioxus_fullstack::render - Suspense resolved [INFO] dioxus_fullstack::render - Rebuilding vdom [INFO] dioxus_signals::signal - new_maybe_sync; [INFO] dioxus_fullstack::hooks::server_future - First run of use_server_future [INFO] dioxus_fullstack::render - Rebuilding vdom [INFO] dioxus_signals::signal - new_maybe_sync; [INFO] dioxus_fullstack::hooks::server_future - First run of use_server_future [INFO] dioxus_fullstack::render - Suspense resolved [INFO] dioxus_fullstack::render - Suspense resolved [INFO] dioxus_fullstack::render - Rebuilding vdom [INFO] dioxus_signals::signal - new_maybe_sync; [INFO] dioxus_fullstack::hooks::server_future - First run of use_server_future [INFO] dioxus_fullstack::render - Rebuilding vdom [INFO] dioxus_signals::signal - new_maybe_sync; [INFO] dioxus_fullstack::hooks::server_future - First run of use_server_future [INFO] dioxus_fullstack::render - Suspense resolved ```Expected behavior
It should not infinitely reload
Screenshots
N/A
Environment:
0.5.0
release, dioxus git9f280a8d84c183c74db3452d60a4601aa343813c
(main at time of project creation)1.77.1
Linux 6.8.2-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC x86_64 GNU/Linux
fullstack
Questionnaire