Skip to content

[WIP] JSX support#76

Open
Jomik wants to merge 1 commit into
masterfrom
feature-JSX
Open

[WIP] JSX support#76
Jomik wants to merge 1 commit into
masterfrom
feature-JSX

Conversation

@Jomik

@Jomik Jomik commented Jul 20, 2018

Copy link
Copy Markdown
Member

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

codecov Bot commented Jul 20, 2018

Copy link
Copy Markdown

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

1 participant