dioxus/packages/core/examples/borrowed.rs

34 lines
510 B
Rust
Raw Normal View History

use dioxus::prelude::*;
use dioxus_core as dioxus;
use dioxus_core_macro::*;
use dioxus_html as dioxus_elements;
fn main() {}
fn app(cx: Scope) -> Element {
cx.render(rsx!(div {
2021-12-26 19:22:30 +00:00
app2(
p: "asd"
)
}))
}
#[derive(Props)]
struct Borrowed<'a> {
p: &'a str,
}
fn app2<'a>(cx: Scope<'a, Borrowed<'a>>) -> Element {
let g = eat2(&cx);
2021-12-21 03:33:13 +00:00
rsx!(cx, "")
}
fn eat2(s: &ScopeState) {}
fn eat(f: &str) {}
fn bleat() {
let blah = String::from("asd");
eat(&blah);
}