# isomorphic-jsx

> A package for using JSX in Node.js

Latest version **0.3.0** (published 2018-11-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install isomorphic-jsx
pnpm add isomorphic-jsx
yarn add isomorphic-jsx
bun add isomorphic-jsx
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2018-11-20 |
| First published | 2018-08-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Frank Lyder Bredland |
| Maintainers | theknarf |
| Keywords | jsx, isomorphic, isomorphic-jsx, declarative, ui |

## Links

- npm: https://www.npmjs.com/package/isomorphic-jsx
- Repository: https://github.com/TheKnarf/isomorphic-jsx
- Homepage: https://github.com/TheKnarf/isomorphic-jsx#readme
- Issues: https://github.com/TheKnarf/isomorphic-jsx/issues
- npm.io page: https://npm.io/package/isomorphic-jsx

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2018-11-20
- 0.2.0 — 2018-09-12
- 0.1.5 — 2018-08-10
- 0.1.4 — 2018-08-10
- 0.1.3 — 2018-08-10
- 0.1.2 — 2018-08-01
- 0.1.1 — 2018-08-01
- 0.1.0 — 2018-08-01

## README

<img width="400px" src="https://github.com/TheKnarf/isomorphic-jsx/raw/master/logo/logo.png">

[![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}) => <div>{children}</div>;

console.log( <Test>tester</Test> ); // "<div>tester</div>"
```

Example repos that use `isomorphic-jsx`:

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

---
_Source: https://npm.io/package/isomorphic-jsx · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
