tjsx
Use React without a transpiler!
Features
- No transpilation required! ES6 tagged template string literals are a part of the language!
- Works on client, server and native.
- Interops with your existing JSX code. No need to rush!
- Tiny codebase - you can hope to understand it if you have any problems, and there's a smaller chance of there being bugs.
xml:id
and other XML namespaced attributes simply work! Also SVG namespaced tags such as<xlink:href>
just work.
Example
const tjsx = // Look ma, no transpilers! { const className = `foo foo__` return tjsx`<div className= onClick= />`}
Interpolating strings
const tjsx = { return tjsx` <h1>Hello, </h1> `}
Using other components
const tjsx = const OneComponent = { return tjsx`<div>foo!</div>`} { return tjsx` <div> < prop1="foo"> </> < /> </div> `}