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:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user