In the previous posts we saw on how to create React Applications using
JavaScript and JSX. We can also write react applications using TypeScript. The
build environment setup will be different when we use TypeScript.
When we created React Applications using JavaScript (ES6) we used the Bable loaders to transpile ES6 code into browser compatible JavaScript code, in case of TypeScript we will have to use a TypeScript loader (ts-loader) instead of Bable. In this post we shall see in details on how to setup the environment for creating React applications using TypeScript.
First to start with let us create a new project by running npm init
When we created React Applications using JavaScript (ES6) we used the Bable loaders to transpile ES6 code into browser compatible JavaScript code, in case of TypeScript we will have to use a TypeScript loader (ts-loader) instead of Bable. In this post we shall see in details on how to setup the environment for creating React applications using TypeScript.
First to start with let us create a new project by running npm init