turbine icon indicating copy to clipboard operation
turbine copied to clipboard

[WIP] JSX support

Open Jomik opened this issue 7 years ago • 1 comments

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>

Jomik avatar Jul 20 '18 19:07 Jomik

Codecov Report

Merging #76 into master will decrease coverage by 1.81%. The diff coverage is 25%.

Impacted Files Coverage Δ
src/elements.ts 96.39% <ø> (ø) :arrow_up:
src/index.ts 100% <100%> (ø) :arrow_up:
src/jsx.ts 20% <20%> (ø)

codecov[bot] avatar Jul 20 '18 19:07 codecov[bot]