feat: amazingly awesome error handling
This commit is contained in:
1 parent
05c909f320
commit
4a72b3140b
58 files changed
+248
-1219
No files matched your search
@@ -3,7 +3,7 @@
|
||||
In Dioxus, VNodes are asynchronous and can their rendering can be paused at any time by awaiting a future. Hooks can combine this functionality with the Context and Subscription APIs to craft dynamic and efficient user experiences.
|
||||
|
||||
```rust
|
||||
fn user_data(cx: Context<()>) -> VNode {
|
||||
fn user_data(cx: Context<()>) -> DomTree {
|
||||
// Register this future as a task
|
||||
use_suspense(cx, async {
|
||||
// Continue on with the component as usual, waiting for data to arrive
|
||||
|
||||
@@ -5,7 +5,7 @@ With the Context, Subscription, and Asynchronous APIs, we've built Dioxus Livevi
|
||||
These set of features are still experimental. Currently, we're still working on making these components more ergonomic
|
||||
|
||||
```rust
|
||||
fn live_component(cx: &Context<()>) -> VNode {
|
||||
fn live_component(cx: &Context<()>) -> DomTree {
|
||||
use_live_component(
|
||||
cx,
|
||||
// Rendered via the client
|
||||
|
||||
@@ -8,7 +8,7 @@ struct MyProps {
|
||||
name: String
|
||||
}
|
||||
|
||||
fn Example(cx: Context<MyProps>) -> VNode {
|
||||
fn Example(cx: Context<MyProps>) -> DomTree {
|
||||
html! { <div> "Hello {cx.cx.name}!" </div> }
|
||||
}
|
||||
```
|
||||
@@ -18,7 +18,7 @@ Here, the `Context` object is used to access hook state, create subscriptions, a
|
||||
```rust
|
||||
// A very terse component!
|
||||
#[fc]
|
||||
fn Example(cx: Context, name: String) -> VNode {
|
||||
fn Example(cx: Context, name: String) -> DomTree {
|
||||
html! { <div> "Hello {name}!" </div> }
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user