1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2025-07-01 04:12:14 +02:00

Add signal listener, reactive and wrap object functions

This commit is contained in:
2023-08-25 20:45:02 +02:00
parent 5417ecea19
commit 77cb9cf626
3 changed files with 79 additions and 24 deletions

View File

@ -1,5 +1,5 @@
import { S, watch, el, namespace, assign, on, dispatch } from "../index.js";
Object.assign(globalThis, { S, watch, el, namespace, assign, on, dispatch });
import { S, reactive, watch, el, namespace, assign, on, dispatch } from "../index.js";
Object.assign(globalThis, { S, reactive, watch, el, namespace, assign, on, dispatch });
const { style, css }= createStyle();
globalThis.test= console.log;
@ -21,7 +21,7 @@ function component({ name= "World", surname= "" }= {}){
margin-inline-start: .5em;
}
`;
const store= S({ name, surname });
const store= reactive({ name, surname });
const full_name= S(()=> store.name()+" "+store.surname());
on(full_name, console.log);