rejsx

1.1.1 • Public • Published

Rejsx

This script allows you to use JSX in the browser with Babel compiled code in the browser or with Babel standalone. Use as if it were a normal DOM element created by document.createElement.

How to use

Just include both scripts like so:

<script src="https://glcdn.githack.com/pythondude325/rejsx/raw/master/main.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@babel/standalone@7.1.0/babel.min.js"></script>

Now you can simply use JSX in a script with type text/babel. Use the JSX as if you wre creating a DOM element with document.createElement.

document.body.appendChild(
    <h1>Hello World</h1>
)

Dependencies

babel-standalone or @babel/standalone are required to use JSX. @babel/standalone is recommended and required if you want to use fragments.

Package Sidebar

Install

npm i rejsx

Weekly Downloads

2

Version

1.1.1

License

MIT

Unpacked Size

3.03 kB

Total Files

4

Last publish

Collaborators

  • pythondude325