jsxx

0.4.0 • Public • Published

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 jsxx

Use from command line:

% jsxx ./main.jsx > main.js

or with browserify:

% browserify -t jsxx/transform ./index.js > ./bundle.js

Readme

Keywords

none

Package Sidebar

Install

npm i jsxx

Weekly Downloads

1

Version

0.4.0

License

none

Last publish

Collaborators

  • andreypopp