Created
February 23, 2023 17:29
-
-
Save frondeus/dae7d79a0552b9213e3395033f25469e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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" } | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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