# TypeScript with React and JSX

This example repo is illustrating usage of TypeScript with React and upcoming JSX syntax support in TypeScript's compiler via `.tsx` file extension.

## Running

 - *Have node.js installed.*
 - Have TypeScript Definition manager (tsd) installed globally: `npm install tsd -g`

 1. Clone this repo.
 2. Run `npm install` to get all dependencies and install typings.
 3. Run `tsd install` to get all type definitions.
 4. Run `npm start` to run Webpack dev server.
 5. Navigate to [localhost:8080](http://localhost:8080) to view the page (it's nothing impressive, really).

## Problems or errors

If you notice anything wrong with this example, please report it under issues.

And if you're feeling extra helpful, pull requests are always welcome!


### [License (MIT)](LICENSE.md)

# TypeScript with React and JSX

> This example repo is illustrating usage of TypeScript with React and JSX syntax support in TypeScript's compiler via `.tsx` file extension.

### :warning: This project is outdated and deprecated

This example came to life in a different time, when TypeScript was just starting to be popular, when JSX syntax support was a new thing for TypeScript, the official documentation on this topic was scarce, and tools like `create-react-app` did not exist yet. 

If you're learning about how to configure a TypeScript project to add Webpack and React, the official TypeScript documentation explains it well, and will likely remain up to date in the future.<br>
See [React & Webpack · TypeScript](https://www.typescriptlang.org/docs/handbook/react-&-webpack.html).

If you're looking for a quick way to start a new React project with TypeScript, my favourite way is [`create-react-app`](https://facebook.github.io/create-react-app/) using the [`--typescript` flag](https://facebook.github.io/create-react-app/docs/adding-typescript).<br>
You can also check out the official [TypeScript-React-Starter](https://github.com/Microsoft/TypeScript-React-Starter) template project.

## Running

 - *Have node.js installed.*
 - Have TypeScript Definition manager (tsd) installed globally: `npm install tsd -g`

 1. Clone this repo.
 2. Run `npm install` to get all dependencies and install typings.
 3. Run `tsd install` to get all type definitions.
 4. Run `npm start` to run Webpack dev server.
 5. Navigate to [localhost:8080](http://localhost:8080) to view the page (it's nothing impressive, really).

## Problems or errors

If you notice anything wrong with this example, please report it under issues.

And if you're feeling extra helpful, pull requests are always welcome!


### [License (MIT)](LICENSE.md)

Add deprecated warning to readme
Add deprecated warning to readme