Initial Commit
This commit is contained in:
11
src/index.tsx
Normal file
11
src/index.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Root } from "./root";
|
||||
|
||||
import * as React from "react";
|
||||
import * as ReactDOM from "react-dom";
|
||||
|
||||
window.onload = () => {
|
||||
const body = document.getElementById("mount");
|
||||
|
||||
const root = <Root name="Friend" />;
|
||||
ReactDOM.render(root, body);
|
||||
};
|
||||
15
src/root.tsx
Normal file
15
src/root.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import * as React from "react";
|
||||
|
||||
export interface Props {
|
||||
name: String;
|
||||
}
|
||||
|
||||
export interface State {}
|
||||
|
||||
export class Root extends React.PureComponent<Props, State> {
|
||||
static displayName = "Root";
|
||||
|
||||
render() {
|
||||
return <h1>Hello, {this.props.name}!</h1>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user