# react-json-pn

> Stateless react component based on JSON template

Latest version **0.0.2** (published 2017-11-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-json-pn
pnpm add react-json-pn
yarn add react-json-pn
bun add react-json-pn
```

## 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.0.2 |
| Published | 2017-11-26 |
| First published | 2017-11-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | dm.shpak |
| Maintainers | dm.shpak |

## Links

- npm: https://www.npmjs.com/package/react-json-pn
- Repository: https://github.com/DmShpak/react-json-pn
- Homepage: https://github.com/DmShpak/react-json-pn#readme
- Issues: https://github.com/DmShpak/react-json-pn/issues
- npm.io page: https://npm.io/package/react-json-pn

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^16.1.1
- [json-pn](https://npm.io/package/json-pn.md) ^1.0.1

## Recent versions

- 0.0.2 (latest) — 2017-11-26
- 0.0.1 — 2017-11-26

## README

# react-json-pn

Create stateless React component from JSON templates

# Motivation

React project can not import components from untrusted place. It makes moving of UI templates to external configuration hard. The main idea of **react-json-pn** is to use ui templates in JSON form.


# Usage 

## Include

```js
import { createCompiler } from 'json-pn'
import { createComponentFactory } from 'react-json-pn'
```

## Create components factory
```js
const componentsFactory = createComponentFactory(createCompiler())
```
## Create component from JSON template

```js
const HelloWord = componentsFactory(['div', {}, 'Hello  Word'])
```

## Use component in your project

```jsx
render( <HelloWord />, document.getElementById('root_id'))
```

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