Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

bit-js/jsx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>;

About

Fast JSX to string renderer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published