0.0.1 • Published 6 years ago

to-element v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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