File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,15 +18,19 @@ This library provides:
1818
1919``` tsx
2020function Counter() {
21- const [counter, setCounter ] = createState (0 )
21+ const [count, setCount ] = createState (0 )
2222
2323 function increment() {
24- setCounter ((v ) => v + 1 )
24+ setCount ((v ) => v + 1 )
2525 }
2626
27+ createEffect (() => {
28+ console .log (" count is" , count ())
29+ })
30+
2731 return (
2832 <Gtk.Box spacing = { 8 } >
29- <Gtk.Label label = { counter ((c ) => c .toString ())} />
33+ <Gtk.Label label = { count ((c ) => c .toString ())} />
3034 <Gtk.Button onClicked = { increment } >Increment</Gtk.Button >
3135 </Gtk.Box >
3236 )
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ export {
2828 createState ,
2929 createEffect ,
3030 createComputed ,
31+ createMemo ,
3132 createBinding ,
3233 createConnection ,
3334 createExternal ,
You can’t perform that action at this time.
0 commit comments