Create React App is React + Webpack. It scaffolds projects.

1
npx create-react-app myapp --template=typescript

React components:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// functional component:
function Foo(x: SomeType) {
return (<div> ... </div>);
}

// class component:
class Bar extends Component {

render() { return (<div>...</div>); }

async componentDidMount() {
let data = await fetch("http://...");
}
}


// Use in JSX:
(<Foo {...x} />)