jsxidom

0.1.6 • Public • Published

JSXIDOM

Transform JSX to incremental DOM with Babel

Use

Install

$ npm i jsxidom --save-dev

In .babelrc

"plugins": [
  ["transform-react-jsx", { "pragma": "jsxidom" }]
]

In application

require('jsxidom');

The above line is required once. In addition to building incremental DOM from JSX, it provides a render method to HTML element.

Example use case

const app = document.body.querySelector('#app')

let i = 0

function refresh() {
  app.render(<div class="counter">{ i++ }</div>)
}

refresh()
setInterval( refresh, 1000 )

Readme

Keywords

none

Package Sidebar

Install

npm i jsxidom

Weekly Downloads

4

Version

0.1.6

License

MIT

Last publish

Collaborators

  • eliot