create-react-app hello-world
npm install --save react react-dom @types/react @types/react-dom
npm install --save-dev typescript awesome-typescript-loader source-map-loader
tsconfig.json
{ "compilerOptions": { "module": "commonjs", "target": "es5", "sourceMap": true, "jsx": "preserve", "noImplicitAny": true, "noImplicitUseStrict":true, "declaration":true, "removeComments":true }, "exclude": [ "node_modules" ] }
App.tsx
import * as React from 'react' export interface AppProps { compiler: string; framework: string; } class App extends React.Component<AppProps,undefined> { render() { return ( <div> Hello World </div> ); } } export default App;
References
https://github.com/mhdr/ReactJSSamples/tree/master/003