Examples¶
Walk through focused examples of the framework's core features. Every example writes its markup as html templates, which Wybthon's compiler prepares when the module is imported or built (see Templates). Each page is a complete module you can drop into a wybthon.toml project (or render in a test with wybthon.testing) and an explanation of the patterns it demonstrates.
| Example | What it shows |
|---|---|
| Counter | Signals, memos, html templates whose dynamic expressions become reactive holes, and typed props with defaults, declared as parameters. |
| Async fetch | Async create_memo with a Loading boundary, refetching, and is_pending. |
| Forms | form_state, bindings, validation, and accessibility helpers from wybthon.forms. |
| Error handling | Recovering from render and async errors with Errored and its err accessor. |
| Router | create_router, Route, layouts, use_link_state, route props declared as parameters, and lazy routes. |
| Authoring patterns | Component tags and composition with children, lists with For, stores, actions, and cleanup. |
Complete apps
For full applications that put these patterns together, see the demo apps guide: standalone repositories like demo-template and data-lab that run entirely in the browser.
Next steps¶
- Read the Concepts section for the underlying mental model.
- Browse the API reference when you need precise function signatures.