Merge branch 'master' into intigrate-collect-assets
This commit is contained in:
1 parent
ffb5de91d1
commit
f976e08f71
379 files changed
+1962
-13517
No files matched your search
+11
-9
@@ -1,33 +1,35 @@
|
||||
//! Run with `cargo-expand` to see what each one expands to
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
//! Run with `cargo-expand` to see what each one expands to.
|
||||
//! This file is named `inlineprops.rs`, because there used to be a `#[inline_props]` macro to
|
||||
//! do this. However, it's now deprecated (and will likely be removed in a future major version),
|
||||
//! so please use `#[component]` instead!
|
||||
use dioxus::prelude::*;
|
||||
|
||||
#[inline_props]
|
||||
#[component]
|
||||
fn Thing1<T>(cx: Scope, _a: T) -> Element {
|
||||
cx.render(rsx! { "" })
|
||||
}
|
||||
|
||||
#[inline_props]
|
||||
#[component]
|
||||
fn Thing2(cx: Scope, _a: u32) -> Element<'a> {
|
||||
cx.render(rsx! { "" })
|
||||
}
|
||||
|
||||
#[inline_props]
|
||||
#[component]
|
||||
fn Thing3<'a, T>(cx: Scope<'a>, _a: &'a T) -> Element<'a> {
|
||||
cx.render(rsx! { "" })
|
||||
}
|
||||
|
||||
#[inline_props]
|
||||
#[component]
|
||||
fn Thing4<'a>(cx: Scope<'a>, _a: &'a u32) -> Element<'a> {
|
||||
cx.render(rsx! { "" })
|
||||
}
|
||||
|
||||
fn main() {
|
||||
dioxus_desktop::launch(app);
|
||||
dioxus_desktop::launch(App);
|
||||
}
|
||||
|
||||
fn app(cx: Scope) -> Element {
|
||||
#[component]
|
||||
fn App(cx: Scope) -> Element {
|
||||
let state = use_state(cx, || 1);
|
||||
|
||||
cx.render(rsx! {
|
||||
|
||||
Reference in new issue
Block a user