React testing

In the final section of this chapter, we will explore the necessary changes to our React sample application, and build a set of unit tests. These tests will verify that our initial application state is correct, as well as check that the page has been updated correctly after firing DOM click events, similar to what we have done with the other frameworks.

Multiple entry points

Our React sample application uses Webpack as a compilation and bundling tool in order to convert our TypeScript files into usable React components. During Webpack's bundling process, we need to specify the entry point of our application, and also specify the output filename. Therefore, given an entry point of /app/index.tsx, and an output filename of /dist/bundle.js ...

Get Mastering TypeScript - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.