Commit 5c89716
committed
Add app.gx as reference for intended syntax
This file documents the intended syntax for the App component, showing
how it would be written in .gx format once the parser supports:
- Type arguments in function calls (make(chan int, 10))
- Variable declarations in component bodies
Currently this file is not parseable, so the component is manually
written in app_gen.go. This serves as:
1. Documentation of the intended component design
2. A reference for future parser enhancements
3. A test case for when type arguments are supported
The syntax shows the complete reactive pattern:
- Creating a channel with make()
- Wiring Input events to send channel values
- Passing channel to child component
- Child receives updates via channel listener1 parent 3a7d18d commit 5c89716
1 file changed
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments