From e6e158b2f49337adc3d2b229996ba2c892687cde Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Mon, 6 Mar 2023 10:54:34 +0100 Subject: [PATCH] Add better description for skooma/bind --- page/skooma.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/page/skooma.html b/page/skooma.html index c600bc2..a429771 100644 --- a/page/skooma.html +++ b/page/skooma.html @@ -270,6 +270,12 @@

The bind helper

+

+ Bind is a low-magic abstraction for simple full re-render micro-components. + It takes a function that renders input data into a DOM subtree and returns an update function. + Every call of the update function will trigger a full re-render of the entire subree and replace the old one within the DOM. +

+
bind
@@ -281,7 +287,7 @@
Transform function
-
...data ⟶ new-element
+
...data ⟶ element
A function that takes the current state and returns a new HTML element. @@ -294,7 +300,7 @@
Update function
-
...data ⟶ new-element
+
...data ⟶ element
A function that passes its arguments to the transform function and