to-element

0.0.1 • Public • Published

to-element

JSX string renderer utility.

Installation

npm i -S to-element

Usage

const toElement = require('to-element')
const { Foo } = require('./ui')

const jsxStr = '<Foo>{bar}</Foo>'
const scope = {
  Foo,
  bar: 'baz'
}

toElement(jsxStr, scope)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Made by Compositor | MIT License

Readme

Keywords

Package Sidebar

Install

npm i to-element

Weekly Downloads

2

Version

0.0.1

License

MIT

Unpacked Size

1.63 kB

Total Files

3

Last publish

Collaborators

  • timneutkens
  • johno