-
-
Notifications
You must be signed in to change notification settings - Fork 939
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
Hot reload causes browser to refresh page multiple times per change #1041
Comments
What version of the Dioxus CLI are you using? |
Hi, sorry, I currently don't have time to investigate this issue further. Feel free to close this issue if you believe it has been resolved. @linulas, I saw you liked the original post. If that means that you were also running into this issue and it hasn't been resolved for you yet, feel free to take over trying to debug this issue with @Demonthos. |
I'm going to close this issue for now because I think it has been fixed. I have ran into this issue with an older version of the CLI, but I haven't encountered it recently. If anyone else has the same issue with the git version of the CLI, let me know and I would be happy to reopen this issue (although it might be better to move the discussion to the dioxuslabs/cli repo) |
I can reproduce this on Linux using Dioxus from the latest commit as of writing this comment. Grepping for the error, it seems to come from here: https://github.com/rustwasm/walrus/blob/440dc03392ab6a43e8933118da64e623b574c1f2/src/module/mod.rs#L253 I think the other error comes from here: bytecodealliance/wasm-tools@cad6975#diff-154ee93e092342f2f38473cbc114e5d864ebf78c4a302e5988805f4f659e45f3 which was written in 2021 and is long gone. Most likely a wasm_bindgen issue |
I can also reproduce this as of commit 1ab5a03 (version Screencast.from.2023-08-13.15-22-14.webm
|
I get the same behavior as @fparsx running the git version CLI. @ealmloff can you reopen the issue? |
Can you provide the CLI version and platform you use that caused this issue? I cannot reproduce the original issue on |
Yesterday I installed the CLI using Here's a snippet that reproduces the issue for me if you change the #![allow(non_snake_case)]
use dioxus::prelude::*;
fn main() {
dioxus_web::launch(App);
}
fn App(cx: Scope) -> Element {
let n = 10;
render! {
div {
font_size: "50px",
"Hello {n * 5}"
}
}
} Relatedly, certain sequences of edits to the string
After making that last edit and saving the file, my browser refreshes several times, alternating between displaying |
That is very helpful information! Something is effecting non-rsx-hot-reloadable reloads in rsx-hot-reload mode. I can reproduce this on mac as well if I edit a part of the rsx that is not hot-reloadable |
Problem
Sometimes when using hot reloading, making a single change will cause the browser to refresh the page multiple times.
Steps To Reproduce
Steps to reproduce the behavior:
dioxus serve --hot-reload
Expected behavior
For it to only refresh the page once per change.
Screenshots
The terminal shows this warning right before it refreshes the page. I'm not sure if it's related:
My Cargo.toml:
Environment:
{ git = "https://github.com/DioxusLabs/dioxus", rev = "b476c6e8a73bd6591ec4827c6f9b196d7c270c3d" }
)Questionnaire
The text was updated successfully, but these errors were encountered: