euv-example 0.3.13

An example application demonstrating the euv UI framework with reactive signals, custom components, and WebAssembly.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::*;

/// Reactive state for an async data fetch feature.
#[derive(Clone, Copy, Data, New)]
pub struct UseFetch {
    /// Whether data is currently being fetched.
    #[get(pub, type(copy))]
    #[set(pub)]
    pub(crate) loading: Signal<bool>,
    /// The fetched data content.
    #[get(pub, type(copy))]
    #[set(pub)]
    pub(crate) data: Signal<String>,
    /// The error message, empty if no error.
    #[get(pub, type(copy))]
    #[set(pub)]
    pub(crate) error: Signal<String>,
}