April 2018
Beginner
536 pages
13h 21m
English
Now that we know how we can use Webpack to build our frontend application and how we can use Express.js to serve its static files, we can focus on the code of the React application. We are going to start by examining the entry point of our frontend application. The application's entry point is located at /web/frontend/index.tsx.
As you can see, we have used the file extension .tsx instead of the .ts extension. This is the case because we are going to use a template system known as JSX. TypeScript supports JSX natively, but it requires us to use the .tsx file extension and to configure the JSX settings in our tsconfig.json file:
"jsx": "react"
The JSX setting determines if the JSX code should be compiled into ...