JSFiddle - React, Tailwind, and code Playground
by rich_harris
HTML
<main></main>
Babel + JSX
Ractive.components.Foo = Ractive.extend({
template: `twice {{foo}} is {{double(foo)}}`,
data: () => ({
foo: 5
})
});
var ractive = new Ractive({
el: 'main',
template: `<Foo num=5/>`,
data: {
double: x => x * 2
}
});