Clicks
Clicks in Sno are very easy. They rest on the backbone of the onclick attribute already provided.Sno only provides a simple way to modify variables right inside the onclick tag.
<body data="{text:'Hello!'}">
<button onclick="$('text = `Goodbye!`')">Leave</button>
<p react>{{text}}</p>
</body>
{{text}}
The Breakdown
Click statements were originally a seperate attribute, but this failed on older devices.The new function method provides a simple way to interact to variables.
Congrats, you now know click statements!
[Prev] [Next]