yew/examples/async_clock
Kaede Hoshikawa 8b9e164d7e
Update Dependencies to Fix CI (#3326)
* Update dependencies.

* Update dependencies.

* Fix gloo breaking change.
2023-07-01 01:33:18 +00:00
..
src Fix clippy for 1.67 (#3100) 2023-02-01 21:57:05 +05:00
Cargo.toml Update Dependencies to Fix CI (#3326) 2023-07-01 01:33:18 +00:00
README.md Simplified and Uniform Example Instructions (#3113) 2023-04-02 03:19:08 +05:00
index.html Async example (#2892) 2022-10-03 16:33:16 +05:00
index.scss Async example (#2892) 2022-10-03 16:33:16 +05:00

README.md

Asynchronous coding in Yew

An example of using asynchronous tasks in a component. This example creates a clock in the background and continuously awaits clock-ticks. When the clock updates the new time is sent to the UI component to display. In parallel it fetches online jokes to make the clock more entertaining to watch.

Its main purpose is to demonstrate various ways of using async code in a yew component. It uses the following async features:

  • send_future
  • send_stream
  • spawn_local
  • mpsc::unbounded channels

Running

Run this application with the trunk development server:

trunk serve --open