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
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request