mirror of
https://github.com/jaandrle/deka-dom-el
synced 2025-04-02 20:15:53 +02:00
* 🔤 ⚡ T now uses DocumentFragment * 🔤 * 🔤 ⚡ * 🐛 lint * ⚡ cleanup * ⚡ 🔤 lib download * ⚡ 🔤 ui * ⚡ reorganize files * ⚡ on.host * 🐛 on.* types * ⚡ 🔤 cdn * 🔤 converter * 🐛 signal.set(value, force) * ⚡ 🔤 * 🔤 ⚡ converter - convert also comments * ⚡ bs/build * 🔤 ui p14 * 🔤 * 🔤 Examples * 🔤 * 🐛 now only el(..., string|number) * 🐛 fixes #38 * 🔤 * ⚡ on.host → on.defer * 🔤 * 📺
36 lines
1.1 KiB
JavaScript
36 lines
1.1 KiB
JavaScript
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(
|
||
el("code", "S(()=> <computation>)"),
|
||
" — read-only signal: reactive value dependent on calculation using other signals",
|
||
),
|
||
el("li").append(
|
||
el("code", "S.on(<signal>, <listener>[, <options>])"),
|
||
" — listen to the signal value changes",
|
||
),
|
||
el("li").append(
|
||
el("code", "S(<value>, <actions>)"),
|
||
" — signal: pattern to create complex reactive objects/arrays",
|
||
),
|
||
el("li").append(
|
||
el("code", "S.action(<signal>, <action-name>, ...<action-arguments>)"),
|
||
" — invoke an action for given signal"
|
||
),
|
||
el("li").append(
|
||
el("code", "S.el(<signal>, <function-returning-dom>)"),
|
||
" — render partial dom structure (template) based on the current signal value",
|
||
),
|
||
el("li").append(
|
||
el("code", "S.clear(...<signals>)"),
|
||
" — off and clear signals (most of the time it is not needed as reactive ",
|
||
"attributes and elements are cleared automatically)",
|
||
),
|
||
);
|
||
}
|