For the web renderer, you can use the dioxus cli to serve your application with hot reloading enabled.
Install dioxus-cli. Hot reloading is automatically enabled when using the web renderer on debug builds.
Run:
dioxus serve --hot-reload
Change some code within a rsx or render macro
Open your localhost in a browser
Save and watch the style change without recompiling
For desktop, LiveView, and tui, you can place the hot reload macro at the top of your main function to enable hot reloading. Hot reloading is automatically enabled on debug builds.
For more information about hot reloading on native platforms and configuration options see the dioxus-hot-reload crate.
Add the following to your main function:
fn main() {
hot_reload_init!();
// launch your application
}
Run:
cargo run
Change some code within a rsx or render macro
Save and watch the style change without recompiling