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
+4
-4
@@ -8,12 +8,12 @@ use gloo_timers::future::TimeoutFuture;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
dioxus::desktop::launch(App, |c| c);
|
||||
dioxus::desktop::launch(App);
|
||||
}
|
||||
|
||||
pub static App: Component<()> = |cx, _| {
|
||||
let count = use_state(cx, || 0);
|
||||
let mut direction = use_state(cx, || 1);
|
||||
pub static App: Component<()> = |cx| {
|
||||
let count = use_state(&cx, || 0);
|
||||
let mut direction = use_state(&cx, || 1);
|
||||
|
||||
let (async_count, dir) = (count.for_async(), *direction);
|
||||
|
||||
|
||||
Reference in new issue
Block a user