mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
* Some initial implementation. * Read prepared state during hydration. * Decode each state with bincode. * Feature gate prepared state. * Update documentation. * Switch from base64 to String. * cargo +nightly fmt. * Fix test. * Add some tests. * Minor adjustments. * Remove unused marker. * Update example. * Add use_transitive_state. * Remove unused dead code notation. * Opt for better code size. * Add tests for use_transitive_state. * Fix cargo fmt. * Fix rustdoc. * Asynchronously decode data during hydration. * Fix feature flags. * Fix docs. * Feature flags on ssr_router. * Adjust workflow to reflect feature flags. * Fix features. * Restore wasm-bindgen-futures to be wasm32 only. * Revert wasm-bindgen-futures. * Second attempt to remove wasm-bindgen-futures. * Remove spaces as well. * Address reviews. * Better diagnostic message. * Update diagnostic messages.
27 lines
639 B
Rust
27 lines
639 B
Rust
use yew::prelude::*;
|
|
use yew_macro::{use_transitive_state_with_closure, use_transitive_state_without_closure};
|
|
|
|
#[function_component]
|
|
fn Comp() -> HtmlResult {
|
|
use_transitive_state_with_closure!(123)?;
|
|
|
|
use_transitive_state_with_closure!(|_| { todo!() }, 123)?;
|
|
|
|
use_transitive_state_with_closure!(|_| -> u32 { todo!() })?;
|
|
|
|
Ok(Html::default())
|
|
}
|
|
|
|
#[function_component]
|
|
fn Comp2() -> HtmlResult {
|
|
use_transitive_state_without_closure!(123)?;
|
|
|
|
use_transitive_state_without_closure!(|_| { todo!() }, 123)?;
|
|
|
|
use_transitive_state_without_closure!(|_| -> u32 { todo!() })?;
|
|
|
|
Ok(Html::default())
|
|
}
|
|
|
|
fn main() {}
|