The examples are built with trunk. Once you have the development environment fully set up (see documentation), running an example is as easy as running a single command:
# move into the directory of the example you want to run
# In this case it's the todomvc example
cd examples/todomvc
# build and serve the example
trunk serve --openSome examples using the rand crate require a special rust flag to be enabled:
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' trunk serve --openSome examples may perform better using the release profile. If something is slow, you can try running it with the --release argument.
We're also publicly hosting the examples at https://examples.yew.rs/<EXAMPLE>.
As an example, check out the TodoMVC example here: https://examples.yew.rs/todomvc
Have a look at Yew's starter templates when starting a project using Yew – they can significantly simplify things.
If one of the examples catches your interest, look for the "improvements" section in its README.md file.
Most examples list a few ideas for how to improve them.
Consider starting with those but don't hesitate to improve an example in other ways either.
One problem that currently plagues most examples is the lack of styling. Please help us make the examples look as flashy as possible!
