docs: update local examples and docs to support new syntaxes
This commit is contained in:
1 parent
e495b09bf1
commit
4de16c4779
118 files changed
+520
-1154
No files matched your search
@@ -9,7 +9,7 @@
|
||||
|
||||
use dioxus::prelude::*;
|
||||
|
||||
pub static Example: FC<()> = |cx, props| {
|
||||
pub static Example: Component<()> = |cx| {
|
||||
let props = MyProps {
|
||||
count: 0,
|
||||
live: true,
|
||||
@@ -27,7 +27,7 @@ pub struct MyProps {
|
||||
name: &'static str,
|
||||
}
|
||||
|
||||
pub static Example1: FC<MyProps> = |cx, MyProps { count, live, name }| {
|
||||
pub static Example1: Component<MyProps> = |cx, MyProps { count, live, name }| {
|
||||
cx.render(rsx! {
|
||||
div {
|
||||
h1 { "Hello, {name}"}
|
||||
|
||||
Reference in new issue
Block a user