1.6.0 • Published 5 years ago

html-tsx v1.6.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

html-tsx

Transform tsx to HTML string

Setup

tsconfig.json

{
  "compilerOptions": {
    "jsx": "react",
    "jsxFactory": "pragma"
  }
}

Usage

import { pragma } from 'html-tsx'

const renderToString = (name: string) => (
  <div class="one two three">
    <p id="line">
      Hello, {name}!
    </p>
  </div>
)

console.log(renderToString('world'))
// => <div class="one two three"><p id="line">Hello, world!</p></div>
1.6.0

5 years ago

1.5.1

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago