mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
.. | ||
public | ||
src | ||
Cargo.toml | ||
index.html | ||
Makefile.toml | ||
README.md |
Parent Child Example
This example highlights four different ways that child components can communicate with their parent:
<ButtonA/>
: passing a WriteSignal as one of the child component props, for the child component to write into and the parent to read<ButtonB/>
: passing a closure as one of the child component props, for the child component to call<ButtonC/>
: adding a simple event listener on the child component itself<ButtonD/>
: providing a context that is used in the component (rather than prop drilling)
Getting Started
See the Examples README for setup and run instructions.