turbine
turbine copied to clipboard
[WIP] JSX support
Fixes #75
Expose a jsxFactory function. Requires the following compileOptions in tsconfig:
"compilerOptions": {
"jsx": "react",
"jsxFactory": "createElement"
}
as well as importing createElement from turbine.
Allow specifying output as a property of the component in JSX.
<div>
Counter {count}
<button output={{ incrementClick: "click" }}>+</button>
<button output={{ decrementClick: "click" }}>-</button>
</div>
Codecov Report
Merging #76 into master will decrease coverage by
1.81%. The diff coverage is25%.
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/elements.ts | 96.39% <ø> (ø) |
:arrow_up: |
| src/index.ts | 100% <100%> (ø) |
:arrow_up: |
| src/jsx.ts | 20% <20%> (ø) |