jetli / rust-yew-realworld-example-app

Exemplary real world app built with Rust + Yew + WebAssembly, by Function Components + Hooks, also supports desktop by Tauri.
https://jetli.github.io/rust-yew-realworld-example-app/
Apache License 2.0
855 stars 110 forks source link

Fix bug and Update Yew 0.21.0 with some improvements #51

Closed aoipril closed 4 months ago

aoipril commented 8 months ago

Fix a article rendering bug:

Fix use_state(|| props.article.clone()) and props.article not synchronized in case of partial tab switching.

Add a debug log in file crates/conduit-wasm/src/components/article_preview.rs

    log::debug!("DEBUG: props.article: {:?}", props.article.clone());
    log::debug!("DEBUG: use_state: {:?}", article.clone());

In some cases their output is different causing the article to be displayed incorrectly

image image

Update dependencies:

Major changes:

References:

Add justfile:

Contains most of the commands found in the README.md file. Justfile:

jetli commented 4 months ago

thanks