@bit-js/jsx
v1.0.0-alpha.3
Published
Use this if you can't use template strings somehow and still want the performance to be 'decent'.
Downloads
7
Readme
A JSX renderer
Use this if you can't use template strings somehow and still want the performance to be 'decent'.
Setup
All the crap you need to do to set this up:
Config
Add these stuff to tsconfig.json
:
{
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "@bit-js/jsx"
}
}
Usage
Then you can write JSX in your file:
const html: string = <p>Hi</p>;
And to escape some strings install @bit-js/web-utils
and do:
import { escapeHTML } from "@bit-js/web-utils";
const html: string = <div>{escapeHTML(htmlString)}</div>;