-
-
Notifications
You must be signed in to change notification settings - Fork 964
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
On the 0.6.0-alpha.4 version, clicking Route:: Link to route does not refresh locally, but reloads the whole page #3235
Comments
Would you be able to test if this occurs on |
I am currently using version Run it using the following command:
Cargo.toml:
main.rs:
|
Rerendering that component isn't optimal, but it shouldn't cause behavior issues. The more problematic issue is the navbar is recreated every time the route changes. Creating the navbar every time will reset any state in the component. The log still triggers if you put it in a use hook: #[component]
fn NavBar() -> Element {
use_hook(|| println!("creating navbar"));
rsx! {
nav { id: "navbar",
Link { to: Route::Home {}, "Home" }
Link { to: Route::BlogList {}, "Blog" }
}
Outlet::<Route> {}
}
} Both of the logs go away when you run the code in release mode. It might be caused by the signal generated in the debug mode expansion of the |
On the 0.6.0-alpha.4 version, clicking Route:: Link to route does not refresh locally, but reloads the whole page
The text was updated successfully, but these errors were encountered: