fix: "React-ish" imports

incremental-dom
Brian Sakal 2 years ago
parent 631fa37785
commit f0b1a4672b

@ -1,13 +1,20 @@
import { React } from "./React";
import { React, createElement, Fragment } from "./React";
export function App({ numberOfTicks=5 }){
export function App({ ticks=[0,1,2,3,4,5] }){
return (
<>
<div class="header">
<h1>Choose Probabilities</h1>
<h5>X-Axis = Ticks, Y-Axis = Underlying Price</h5>
</div>
<div class="chart"></div>
<div class="chart">
{ticks.map((tick)=>
<>
<label>T_{tick}</label>
<input key={tick} type="range" min="0" max="100" />
</>
)}
</div>
</>
);
}

@ -1,4 +1,6 @@
import { createElement } from "inferno-create-element";
import { Fragment } from "inferno";
export const React = {createElement, Fragment};
const React = {createElement, Fragment};
export { createElement, Fragment, React };
export default React;

@ -1,6 +1,5 @@
import { render } from "inferno";
import { App } from "./App";
import { React } from "./React";
import {React, createElement} from "./React";
render(<App />, document.getElementById("app"));
Loading…
Cancel
Save