dioxus/packages/core/examples/borrowed.rs
2021-12-20 22:33:13 -05:00

33 lines
515 B
Rust

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 {
App2 {
p: "asd"
}
}))
}
#[derive(Props)]
struct Borrowed<'a> {
p: &'a str,
}
fn App2<'a>(cx: Scope<'a, Borrowed<'a>>) -> Element {
let g = eat2(&cx);
rsx!(cx, "")
}
fn eat2(s: &ScopeState) {}
fn eat(f: &str) {}
fn bleat() {
let blah = String::from("asd");
eat(&blah);
}