Skip to content

Conversation

@Jomik
Copy link
Member

@Jomik Jomik commented Jul 20, 2018

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 Jomik self-assigned this Jul 20, 2018
@codecov
Copy link

codecov bot commented Jul 20, 2018

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% <ø> (ø) ⬆️
src/index.ts 100% <100%> (ø) ⬆️
src/jsx.ts 20% <20%> (ø)

@paldepind paldepind mentioned this pull request Jul 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

idea: JSX to Turbine

2 participants