0.4.0 • Published 12 years ago
jsxx v0.4.0
jsxx
JSX eXperimental. It adds few features to JSX language used in React.
Namespaces supports
So <module:component /> compiles to module.component(null).
<template> element
jsxx handles <template> element by compiling it to a function which accepts
two arguments and returns an array of element children. So the following
snippet:
<template>
Hello, {name}
</template>is compiled into
function(props, state) {
return ['Hello, ', name]
}Installation and usage
Install from npm:
% npm install jsxxUse from command line:
% jsxx ./main.jsx > main.jsor with browserify:
% browserify -t jsxx/transform ./index.js > ./bundle.js