docs: tutorial: update outdated fetching data section#4141
Conversation
Fetching data section of the tutorial page still mentioned using `wasm-bindgen-futures::spawn_local`. Updated the docs and examples to use `yew::platform::spawn_local` and the `use_future` hook instead.
…tions The wasm-bindgen-futures was still present in the docs, so removed it. Adding the delay to see the loading should have been a last section so moved it to the end. Removed the path and populated the same with the full link, as later in the docs to fix the cors issue we are asking the user to replace the full link with the path.
|
Hi @Madoshakalaka , Could you please check english the version? If it looks good i can translate it into other languages. |
|
Visit the preview URL for this PR (updated for commit 174cb75): https://yew-rs--pr4141-fix-shan-docs-4083-9uv445ea.web.app (expires Sun, 14 Jun 2026 03:36:47 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
|
the App diff should also remove the stray if let block, since VideosFetcher is the new home for that rendering. In all three versions of index.mdx at the App-update code block, please add to the - lines: and re-tune the highlight ranges accordingly. you can now if somebody follows our tutorial they will get: with the video details rendered twice. |
|
Ahh, thanks for catching that. I will update it. |
|
HI @Madoshakalaka , sorry for the delay. I was busy with some uni things. The PR is ready for review now. |
… gloo-net
- Normalize the `use_future`/`spawn_local` docs.rs links to each page's
version (`latest` for next/current, `0.23.0`/`0.22.0` for the versioned
docs and their translations) instead of hard-coding `0.23.0`/`latest`.
- Correct the Cargo.toml code-block highlight range `{2-6}` -> `{2-5}`
(the block is only 5 lines).
- Bump the tutorial's `gloo-net` from `0.6` to `0.7`, matching the version
the snippets are compiled against in `tools/website-test`.
Madoshakalaka
left a comment
There was a problem hiding this comment.
sorry for the delay.
All good. I took the liberty of fixing some minor issues and pushed to your branch.
Will merge in a moment
Description
Fetching data section of the tutorial page still mentioned using
wasm-bindgen-futures::spawn_local. Updated the docs and examples to useyew::platform::spawn_localand theuse_futurehook instead.note: for translation purpose I did used LLM (Codex | GPT-5.4)
Fixes #4083
Checklist