Skip to content

Examples

Walk through focused examples that mirror the demo app pages. Each example links to a runnable file under examples/demo/ in the repo and explains the patterns it demonstrates.

Example What it shows Source
Counter Signals, derived values, and event handlers. examples/demo/app/pages/counter.py
Async fetch create_resource with Suspense for loading states. examples/demo/app/pages/fetch.py
Forms form_state and accessibility-friendly bindings. examples/demo/app/pages/forms.py
Error boundary Recovering from render errors with ErrorBoundary. examples/demo/app/pages/errors.py
Router Route, Link, and dynamic params. examples/demo/app/pages/router.py
Authoring patterns Common idioms for building reusable components. examples/demo/app/pages/authoring.py

Running the demo

Run python -m http.server from the repository root and open /examples/demo/index.html to see these examples in action. The dev server (wyb dev --dir .) additionally provides hot-reload on file changes.

Next steps

  • Read the Concepts section for the underlying mental model.
  • Browse the API reference when you need precise function signatures.