fix: readme and examples syntax

This commit is contained in:
Jonathan Kelley committed 2021-12-28 23:48:25 -05:00
1 parent f24aae8787
commit 3dc0e59876
102 files changed
+213 -1222

No files matched your search

+3 -3
View File
@@ -1,7 +1,7 @@
use dioxus::prelude::*;
fn main() {}
pub static Example: Component<()> = |cx| {
pub static Example: Component = |cx| {
cx.render(rsx! {
div {
@@ -10,7 +10,7 @@ pub static Example: Component<()> = |cx| {
};
// A controlled component:
static ControlledSelect: Component<()> = |cx| {
static ControlledSelect: Component = |cx| {
let value = use_state(&cx, || String::from("Grapefruit"));
cx.render(rsx! {
select { value: "{value}", onchange: move |evt| value.set(evt.value()),
@@ -23,7 +23,7 @@ static ControlledSelect: Component<()> = |cx| {
};
// TODO - how do uncontrolled things work?
static UncontrolledSelect: Component<()> = |cx| {
static UncontrolledSelect: Component = |cx| {
let value = use_state(&cx, || String::new());
cx.render(rsx! {