JSFiddle - React, Tailwind, and code Playground
by damngoto
HTML
<script src="http://cdn.ractivejs.org/latest/ractive.js"></script>
<h3>how to use radio</h3>
<div id="output"></div>
<script id="template" type="text/plain">
<label for="">
<input type="radio" name="{{type}}" value="btc" id="">
btc
</label>
<label for="">
<input type="radio" name="{{type}}" value="cny" id="">
cny
</label>
</script>
JavaScript
// Hit Shift-Enter to execute this code
var ractive = new Ractive({
el: '#output',
template: '#template'
});
ractive.observe('type', function(val) {
console.log(val)
})