In this video, Emmanuel Henri introduces TypeScript in the context of building a React application and shows what to look for.
Next is the tsconfig file, which is the one file needed to be able to use TypeScript in your project. As mentioned before, in the past, when we were using Create React App, or react-scripts, prior to version 2.1, we had to create all these files manually and update Webpack ourselves. Therefore we had to eject a React project and lose a lot of the React ease-of-use. But now this is all done automatically for us. As soon as Webpack recognizes the dependencies we installed in the project, it adds the tsconfig file for us, and with it the options and best practices a React project requires.
If you look at the tsconfig, it has the JSX, forceConsistentCasingInFileNames, and many others options turned on. If you skip the video where we install React or created your project from a version of Create React prior to 2.1, you will not see what I've shown here, and I strongly suggest you go back to these videos where we set up React and then TypeScript. You'll definitely thank me as it is much easier this way.
- Basic and complex types
- Functional/stateless components
- Class/stateful components
- Interfaces with React and TypeScript
- Implementing higher-order components