Struct wasm_react::Suspense
source · [−]pub struct Suspense;
Expand description
A component that specifies the loading indicator when loading lazy descendant components.
For more information, see React documentation about code-splitting.
Example
Suspense::new()
.fallback(c![
h!(div[."loading"]).build(c!["Loading…"]),
])
.build(c![
SomeLazyComponent { /* … */ }.build()
])
Implementations
Trait Implementations
impl Copy for Suspense
Auto Trait Implementations
impl RefUnwindSafe for Suspense
impl Send for Suspense
impl Sync for Suspense
impl Unpin for Suspense
impl UnwindSafe for Suspense
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more