In this video, Emmanuel Henri demonstrates how to properly install TypeScript and how to set up the files to work in a React project.
- [Instructor] Now that we have a React project started,…lets go ahead and set up typescript.…So, the first thing we're going to do is…stop our server here, so lets do CTRL + C…in our terminal, and yes.…And, the cool thing with React Now is…when you install a few packages webpack will recognize this…and create a ts.config file for you.…So, We needed to do all this manually before we need…to update webpack and we don't have to do that any more.…So it's very simple now…and that's why I asked you specifically…to install the version of React Script 2.1 and above.…
So if we take a look at the package.json,…you should have a React Script version 2.1 and above…and this is 2.1.1, we're good to go…and basically it follows the Create React App version.…So if you follow the version of Create React App,…it's going to be the same version as the React Scripts.…Alright, so let's go ahead and install a few things…that we need to do typescript.…We're going to do npm install and you can do Yarn if you prefer…and then do --save and we're going to do typescript…
- Basic and complex types
- Functional/stateless components
- Class/stateful components
- Interfaces with React and TypeScript
- Implementing higher-order components