Skip to content

Commit 3a7d18d

Browse files
committed
Add App component with channel-based reactive integration
The App component demonstrates the complete reactive counter example: - Creates a bidirectional channel (buffered, capacity 10) - Input field sends values to the channel on input events - Counter component receives updates via the channel - Non-blocking channel send using select/default pattern This component is manually written because the parser doesn't yet support type arguments in function calls like make(chan int, 10). Future work will extend the parser to support this syntax. The App component shows the full pattern: 1. Parent creates channel 2. Parent passes channel to child via WithChannel option 3. Child's BindApp() starts goroutine listener 4. Goroutine updates current value and triggers re-render 5. Child's Render() uses non-blocking current value
1 parent db2f15c commit 3a7d18d

1 file changed

Lines changed: 71 additions & 0 deletions

File tree

examples/counter/app_gen.go

Lines changed: 71 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)