namespacing the store functions. allowing _ in params
parent
1af838126e
commit
9b8916eb72
@ -1,17 +0,0 @@
|
|||||||
counter = store 0;
|
|
||||||
|
|
||||||
view = state viewport \
|
|
||||||
currentCount = get counter;
|
|
||||||
|
|
||||||
Column {
|
|
||||||
gap = 10,
|
|
||||||
children = [
|
|
||||||
Text { content = str currentCount, x = 30, y = 30 },
|
|
||||||
Clickable {
|
|
||||||
event = update counter (n \ n + 1),
|
|
||||||
child = Rect { w = 100, h = 40, color = "blue" }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
|
|
||||||
{ init = {}, update = state event \ state, view = view }
|
|
||||||
Loading…
Reference in New Issue