Data Properties
Similar to Vue.js and other frontend JavaScript frameworks, you can define and initialize reactive properties on your cbwire components.
Initializing Properties
// File: wires/Counter.cfc
component extends="cbwire.models.Component"{
variables.data = {
"counter": 0
};
...
}Referencing Properties
// File: wires/Counter.cfc
component extends="cbwire.models.Component"{
// Data properties
variables.data = {
"counter": 0
};
// Action called from UI
function increment(){
variables.data.counter += 1;
}
...
}Things To Know
Last updated
Was this helpful?