JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://rawgithub.com/RactiveJS/Ractive/0.4.0/build/Ractive.js"></script>
<div id='container'></div>

<script id='myTemplate' type='text/ractive'>
    <p>Inspect these inputs to see their names</p>
    <label><input type='radio' name='{{foo}}' value='1'/> 1</label>
    <label><input type='radio' name='{{foo}}' value='2'/> 2</label>
    <label><input type='radio' name='{{foo}}' value='3'/> 3</label>
    <p>Selected value {{foo}} ({{typeof foo}})</p>
</script>

JavaScript

var ractive = new Ractive({
    el: 'container',
    template: '#myTemplate',
    data: { foo: 3 }
});

ractive.findAll('input[type="radio"]').forEach( function(input) {
    input.name = input.name.replace('{{','').replace('}}','');
});

// If you do ractive.set('foo',3) in the console,
// the correct input will be checked - it does a
// double equals comparison between 3 and '3'