state creates a reactive value that can the be used with tags to create dinamic and reactive apps.
state
https://github.com/nombrekeff/cardboard-js/wiki/State
const count = state(0);count.changed(() => { ... });count.dispatch(2);count.value++;div().hideIf(count);div().disableIf(count);div(template('Count is: $count', { count: count })); Copy
const count = state(0);count.changed(() => { ... });count.dispatch(2);count.value++;div().hideIf(count);div().disableIf(count);div(template('Count is: $count', { count: count }));
state
creates a reactive value that can the be used with tags to create dinamic and reactive apps.