docs: big updates to the reference

This commit is contained in:
Jonathan Kelley committed 2021-07-16 16:11:25 -04:00
1 parent caf772cf24
commit 583fdfa561
57 files changed
+726 -247

No files matched your search

+4 -5
View File
@@ -8,27 +8,26 @@
//! values, using the manual props as the base and then modifying fields specified with non-spread attributes.
use dioxus::prelude::*;
fn main() {}
static App: FC<()> = |cx| {
pub static Example: FC<()> = |cx| {
let props = MyProps {
count: 0,
live: true,
name: "Dioxus",
};
cx.render(rsx! {
Example { ..props, count: 10, div {"child"} }
Example1 { ..props, count: 10, div {"child"} }
})
};
#[derive(PartialEq, Props)]
struct MyProps {
pub struct MyProps {
count: u32,
live: bool,
name: &'static str,
}
static Example: FC<MyProps> = |cx| {
pub static Example1: FC<MyProps> = |cx| {
cx.render(rsx! {
div {
h1 { "Hello, {cx.name}"}