Archived
feat: el-ui — activation-based frontend framework, spreading activation reactivity, graph state
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
component Counter {
|
||||
state {
|
||||
count: Int = 0
|
||||
}
|
||||
|
||||
template {
|
||||
<div class="counter">
|
||||
<h1 class="count">{count}</h1>
|
||||
<div class="buttons">
|
||||
<button on:click={() => count = count + 1}>+</button>
|
||||
<button on:click={() => count = count - 1}>-</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
component App {
|
||||
template {
|
||||
<div class="app">
|
||||
<Counter />
|
||||
</div>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user