jsx0
JSX string to React component converter
npm i jsx0
const src = `<h1>{props.children}</h1>` const Heading = // <Heading>Hello</Heading>
Scope
An object of scoped variables can be passed as a second argument for things like creating composite components.
import React from 'react'import jsx0 from 'jsx0' const Box = <div />const Image = <img />const Text = <p /> const Card =
⚠️ Security
This is dangerous to use with user-generated content and in web applications. This library is primarily intended for sandboxed Node.js environments.