fix: "React-ish" imports
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 (
|
return (
|
||||||
<>
|
<>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h1>Choose Probabilities</h1>
|
<h1>Choose Probabilities</h1>
|
||||||
<h5>X-Axis = Ticks, Y-Axis = Underlying Price</h5>
|
<h5>X-Axis = Ticks, Y-Axis = Underlying Price</h5>
|
||||||
</div>
|
</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 { createElement } from "inferno-create-element";
|
||||||
import { Fragment } from "inferno";
|
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 { render } from "inferno";
|
||||||
import { App } from "./App";
|
import { App } from "./App";
|
||||||
import { React } from "./React";
|
import {React, createElement} from "./React";
|
||||||
|
|
||||||
|
|
||||||
render(<App />, document.getElementById("app"));
|
render(<App />, document.getElementById("app"));
|
Loading…
Reference in New Issue