summaryrefslogtreecommitdiff
path: root/main.js
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2021-04-13 11:37:51 -0500
committersanine-a <sanine.not@pm.me>2021-04-13 11:37:51 -0500
commitc9c1b78ed805371615d3ca8b54c86da9a35db8ce (patch)
tree1af9063f2e30392fc039738105f86461dddec576 /main.js
parentbc594a2d3839d1d0a3cc76eed23ec8535c72f6bf (diff)
implement basic user input and button styling
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(