Jay Graves 8549ebe361
Add a timer example that uses function components. (#3128)
* Start a functional timer example.

* Start on the actions.

* wip

* Clean up a bit.

* More sensible times.

* Wip

* Add canceled message.

* Add a distinction between Cancel and Clear.

* Bring timer_function up to parity with the class based example.

* Fix clippy warnings.

* cargo fmt

* Update README.

* Update examples/timer_functional/src/main.rs

Co-authored-by: Jedd Dryden <40693089+Jaffa-Cakes@users.noreply.github.com>

* Add README.md

* Fix wqREADME.md spacing.

* Add key to message iterator.

* Update to new use_effect_with signature.

---------

Co-authored-by: Jedd Dryden <40693089+Jaffa-Cakes@users.noreply.github.com>
Co-authored-by: = <=>
2023-04-05 21:39:27 +03:00
..
2022-04-11 17:02:59 +05:00

Timer Example

Demo

This is a technical demonstration for how to use timeouts and intervals.

Concepts

The example mainly demonstrates the use of gloo_timer and gloo_console_timer but also makes use of some more advanced web console features.

Improvements

  • Apply the concept to something more fun than just a dry technical demonstration

Running

Run this application with the trunk development server:

trunk serve --open