rust-yew-realworld-example-app icon indicating copy to clipboard operation
rust-yew-realworld-example-app copied to clipboard

Fix bug and Update Yew 0.21.0 with some improvements

Open Coylr opened this issue 6 months ago • 0 comments

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:

  • Yew: Replace use_effect_with_deps with use_effect_with

References:

Add justfile:

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

  • Manually:
    • Install [wasm-pack] just install-wasm-pack
    • Copy .env.example to .env just env
    • Trunk serve just trunk-serve
    • Trunk build just trunk-build
    • Test just test
  • Tauri:
    • Install [Tauri] just install-tauri
    • Build and develop just tauri-dev
    • Build and release just tauri-build
  • Yew-app:
    • Create-yew-app just create-yew-app
    • App-serve just app-serve

Coylr avatar Jan 05 '24 08:01 Coylr