summaryrefslogtreecommitdiff
path: root/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'main.js')
-rw-r--r--main.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/main.js b/main.js
index 0ca765b..72c97a4 100644
--- a/main.js
+++ b/main.js
@@ -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(