diff options
Diffstat (limited to 'main.js')
-rw-r--r-- | main.js | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -2,6 +2,16 @@ const h = Inferno.h; +function useState(initial) { + let state = initial; + let setState = (value) => { + state = value; + render(); + } + return [state, setState]; +} + + function render() { Inferno.render( |