Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eliot-akira/jsxidom
Transform JSX to incremental DOM with Babel
https://github.com/eliot-akira/jsxidom
Last synced: about 1 month ago
JSON representation
Transform JSX to incremental DOM with Babel
- Host: GitHub
- URL: https://github.com/eliot-akira/jsxidom
- Owner: eliot-akira
- Created: 2016-02-08T10:14:32.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-08T10:19:03.000Z (almost 9 years ago)
- Last Synced: 2023-12-24T22:09:29.926Z (11 months ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [JSXIDOM](https://github/eliot-akira/jsxidom)
Transform JSX to incremental DOM with Babel
## Use
Install
~~~bash
$ npm i jsxidom --save-dev
~~~In *.babelrc*
~~~json
"plugins": [
["transform-react-jsx", { "pragma": "jsxidom" }]
]
~~~In application
~~~javascript
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
~~~javascript
const app = document.body.querySelector('#app')let i = 0
function refresh() {
app.render({ i++ })
}refresh()
setInterval( refresh, 1000 )
~~~