import * as React from 'react'
import * as ReactDOM from 'react-dom'
const Hello: React.FunctionComponent<{
compiler: string,
framework: string
}> = props => {
return (
<div>
<div>{props.compiler}</div>
<div>{props.framework}</div>
</div>
)
}
ReactDOM.render(
<Hello compiler="TypeScript" framework="React" />,
document.getElementById('root')
)
당신은 놀라운 애플리케이션 개발을 할 수 있습니다.
당신은 최신 패키지를 사용할 수 있습니다. npm install typescript@latest react@latest react-dom@latest @types/react@latest @types/react-dom@latest webpack@latest webpack-dev-server@latest webpack-cli@latest ts-loader@latest clean-webpack-plugin@latest html-webpack-plugin@latest --save-exact
npm start를 실행하십시요.
src/app/app.tsx 이 파일을 수정하면 애플리케이션이 실시간으로 새로고침 됩니다.
src/templates/index.html 이 파일을 수정하면 웹서버에서 실시간으로 새로고침 됩니다.