Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/jutaz/render-primitive
- Owner: jutaz
- Created: 2018-06-23T14:33:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-23T14:33:41.000Z (over 6 years ago)
- Last Synced: 2024-12-21T04:13:29.196Z (about 1 month ago)
- Topics: component, javascript, jsx, npm-package, primitive-values, react
- Language: JavaScript
- Size: 102 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)