2024-05-22 21:43:49 +02:00
|
|
|
|
import { el } from "deka-dom-el";
|
|
|
|
|
import { mnemonicUl } from "../mnemonicUl.html.js";
|
|
|
|
|
|
|
|
|
|
export function mnemonic(){
|
|
|
|
|
return mnemonicUl().append(
|
|
|
|
|
el("li").append(
|
|
|
|
|
el("code", "S(<value>)"), " — signal: reactive value",
|
|
|
|
|
),
|
|
|
|
|
el("li").append(
|
2024-11-22 16:26:42 +01:00
|
|
|
|
el("code", "S(()=> <computation>)"),
|
|
|
|
|
" — read-only signal: reactive value dependent on calculation using other signals",
|
2024-05-22 21:43:49 +02:00
|
|
|
|
),
|
|
|
|
|
el("li").append(
|
2024-11-22 16:26:42 +01:00
|
|
|
|
el("code", "S.on(<signal>, <listener>[, <options>])"),
|
|
|
|
|
" — listen to the signal value changes",
|
2024-05-22 21:43:49 +02:00
|
|
|
|
),
|
|
|
|
|
el("li").append(
|
2024-11-22 16:26:42 +01:00
|
|
|
|
el("code", "S.clear(...<signals>)"),
|
|
|
|
|
" — off and clear signals",
|
2024-05-22 21:43:49 +02:00
|
|
|
|
),
|
|
|
|
|
el("li").append(
|
2024-11-22 16:26:42 +01:00
|
|
|
|
el("code", "S(<value>, <actions>)"),
|
|
|
|
|
" — signal: pattern to create complex reactive objects/arrays",
|
2024-05-22 21:43:49 +02:00
|
|
|
|
),
|
|
|
|
|
el("li").append(
|
2024-11-22 16:26:42 +01:00
|
|
|
|
el("code", "S.action(<signal>, <action-name>, ...<action-arguments>)"),
|
|
|
|
|
" — invoke an action for given signal"
|
2024-05-22 21:43:49 +02:00
|
|
|
|
),
|
|
|
|
|
el("li").append(
|
2024-11-22 16:26:42 +01:00
|
|
|
|
el("code", "S.el(<signal>, <function-returning-dom>)"),
|
|
|
|
|
" — render partial dom structure (template) based on the current signal value",
|
2024-05-22 21:43:49 +02:00
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
}
|