Skip to content

Instantly share code, notes, and snippets.

@frondeus
Created February 23, 2023 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frondeus/dae7d79a0552b9213e3395033f25469e to your computer and use it in GitHub Desktop.
Save frondeus/dae7d79a0552b9213e3395033f25469e to your computer and use it in GitHub Desktop.
[package]
name = "dioxus-hmr"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
dioxus = "0.3.2"
dioxus-desktop = "0.3.0"
dioxus-hot-reload = "0.1.1"
[patch.crates-io]
dioxus = { git="https://github.com/dioxuslabs/dioxus", branch="master" }
dioxus-desktop = { git="https://github.com/dioxuslabs/dioxus", branch="master" }
dioxus-hot-reload = { git="https://github.com/dioxuslabs/dioxus", branch="master" }
dioxus-core = { git="https://github.com/dioxuslabs/dioxus", branch="master" }
dioxus-core-macro = { git="https://github.com/dioxuslabs/dioxus", branch="master" }
dioxus-hooks = { git="https://github.com/dioxuslabs/dioxus", branch="master" }
dioxus-html = { git="https://github.com/dioxuslabs/dioxus", branch="master" }
dioxus-rsx = { git="https://github.com/dioxuslabs/dioxus", branch="master" }
dioxus-interpreter-js = { git="https://github.com/dioxuslabs/dioxus", branch="master" }
use dioxus::prelude::*;
fn main() {
hot_reload_init!();
dioxus_desktop::launch(app)
}
fn app(cx: Scope) -> Element {
cx.render(rsx! {
div {
color: "orange", // Try changing from "orange" to "green"
"Foo!"
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment