Introduction
CBWIRE is a ColdBox module that helps you build modern, reactive CFML applications in record time - without using much JavaScript or building backend APIs. Become a web development hero with CBWIRE!
Last updated
CBWIRE is a ColdBox module that helps you build modern, reactive CFML applications in record time - without using much JavaScript or building backend APIs. Become a web development hero with CBWIRE!
Last updated
mkdir cbwire-playground --cd
coldbox create app
install cbwire@be
server start<!--- ./layouts/Main.cfm --->
<cfoutput>
<!doctype html>
<html>
<head>
<!--- CBWIRE CSS --->
#wireStyles()#
</head>
<body>
<!--- INSERT A COUNTER HERE --->
#wire( "Counter" )#
<!--- CBWIRE JS --->
#wireScripts()#
</body>
</html>
</cfoutput><cfscript>
// Data properties
data = {
"counter": 0 // default value
};
// Actions
function increment() {
data.counter += 1;
}
</cfscript>
<!--- Our template --->
<cfoutput>
<div>
<div>Count: #counter#</div>
<button wire:click="increment">+</button>
</div>
</cfoutput>