Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/jutaz/render-primitive

⚛️ Render JS primitives as text in React
https://github.com/jutaz/render-primitive

component javascript jsx npm-package primitive-values react

Last synced: 1 day ago
JSON representation

⚛️ Render JS primitives as text in React

Awesome Lists containing this project

README

        

# render-primitive

> Renders JS primitives as text in React

[![NPM](https://img.shields.io/npm/v/render-primitive.svg)](https://www.npmjs.com/package/render-primitive) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save render-primitive
```

## Usage

```jsx
import React, { Component } from 'react'

import RenderPrimitive from 'render-primitive'

class Example extends Component {
render () {
return (


{/* Basic usage */}
{true}
{false}
{undefined}
{null}
{123}
{new Symbol('foo')}
{'bar'}

{/* Prop shortcut */}


)
}
}
```

## License

MIT © [jutaz](https://github.com/jutaz)