| Start |
|---|
| ReactJS component written in Typescript You can use ReactJS's components easily in TypeScript. Just rename the 'jsx' file extension to 'tsx': But in order to make full use of TypeScript's main feature (static type checking) you must do a couple things: 1) convert React.createClass to an ES6 Class: For more info on converting to ES6 look here (opens new window) 2) Add Props and State interfaces: Now TypeScript will display an error if the programmer forgets to pass props. Or if trying to pass in props that are not defined in the interface. |
| Typescript & react & webpack Installing typescript, typings and webpack globally
Installing loaders and linking typescript
Linking TypeScript allows ts-loader to use your global installation of TypeScript instead of needing a separate local copy typescript doc (opens new window) installing installing
finally run Note: React and ReactDOM are marked as external |
Read Article
https://develop.horje.com/learn/1434/reference