Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vjeux/jsxdom

DOM backend for JSX
https://github.com/vjeux/jsxdom

Last synced: about 1 month ago
JSON representation

DOM backend for JSX

Awesome Lists containing this project

README

        

> **ABANDONED**: This was just an evening hack when we released React a few years ago. It doesn't work anymore. You should use [nativejsx](https://github.com/treycordova/nativejsx) for a more up to date version.

jsxdom
======

[React](http://facebook.github.io/react/) is bundled with a Javascript transpiler called [JSX](http://facebook.github.io/react/docs/syntax.html). It gives the ability to write <html> tags within Javascript. The advertised way to use JSX is React.DOM to create React light DOM elements, but it is not the only way. We can create another JSX backend, called JSXDOM, to create real DOM elements.

```javascript
/** @jsx JSXDOM */

var defaultValue = "Fill me ...";

document.body.appendChild(



Click Me!

    {['un', 'deux', 'trois'].map(function(number) {
    return
  • {number}
  • ;
    })}


);
```

[Read the blog post for more information](http://blog.vjeux.com/2013/javascript/jsx-for-the-real-dom.html)