Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/theknarf/isomorphic-jsx

A JSX-powered templating library for building multi page websites.
https://github.com/theknarf/isomorphic-jsx

declerative isomorphic isomorphic-jsx javascript jsx library ui

Last synced: 8 days ago
JSON representation

A JSX-powered templating library for building multi page websites.

Awesome Lists containing this project

README

        

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/TheKnarf/isomorphic-jsx/blob/master/LICENSE) [![NpmVersion](https://img.shields.io/npm/v/isomorphic-jsx.svg)](https://www.npmjs.com/package/isomorphic-jsx) [![Build Status](https://travis-ci.org/TheKnarf/isomorphic-jsx.svg?branch=master)](https://travis-ci.org/TheKnarf/isomorphic-jsx) [![Coverage Status](https://coveralls.io/repos/github/TheKnarf/isomorphic-jsx/badge.svg?branch=master)](https://coveralls.io/github/TheKnarf/isomorphic-jsx?branch=master) [![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/isomorphic-jsx/Lobby?source=orgpage)

A JSX-powered templating library for building multi page websites,
use the JSX syntax both in the browser and in Node.js.
A powerfull library in under 100 lines of code!

```sh
npm install --save isomorphic-jsx
npm install --save-dev @babel/core @babel/preset-react
```

You also need to install and setup babel with the react preset for babel preset.

## Usage

You need to setup the following in `.babelrc`:

```js
{
presets: [
[ '@babel/preset-react', {
pragma: 'dom',
throwIfNamespace: false
}]
]
}
```

An example of a simple test case:

```js
import { dom } from 'isomorphic-jsx';

const Test = ({children}) =>

{children}
;

console.log( tester ); // "

tester
"
```

Example repos that use `isomorphic-jsx`:

- [theneva/beer-or-movie](https://github.com/theneva/beer-or-movie)