next step to get stateful components
This commit is contained in:
parent
0255f58964
commit
f0e2d41fde
4 changed files with 126 additions and 49 deletions
|
|
@ -10,7 +10,6 @@ proc carousel*(key: VKey): VNode {.component.} =
|
|||
|
||||
proc next(ev: Event; n: VNode) =
|
||||
counter = (counter + 1) mod images.len
|
||||
markDirty key
|
||||
|
||||
result = buildHtml(tdiv(key=key)):
|
||||
text images[counter]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue