Book Image

React Projects

By : Roy Derks
Book Image

React Projects

By: Roy Derks

Overview of this book

Developed by Facebook, React is a popular library for building impressive user interfaces. React extends its capabilities to the mobile platform using the React Native framework and integrates with popular web and mobile tools to build scalable applications. React Projects is your guide to learning React development by using modern development patterns and integrating React with powerful web tools such as GraphQL, Expo, and React 360. You'll start building a real-world project right from the first chapter and get hands on with developing scalable applications as you advance to building more complex projects. Throughout the book, you'll use the latest versions of React and React Native to explore features such as Higher Order Components (HOC), Context, and Hooks on multiple platforms, which will help you build full stack web and mobile applications efficiently. Finally, you'll delve into unit testing with Jest to build test-driven apps. By the end of this React book, you'll have developed the skills necessary to start building scalable React apps across web and mobile platforms.
Table of Contents (14 chapters)

Build an Application Exploring TDD Using Jest and Enzyme

To keep your application maintainable, it is good practice to have testing set up for your project. Where some developers hate writing tests and therefore try to avoid writing them, other developers like to make testing the core of their development process by implementing a test-driven development (TDD) strategy. There are many opinions about testing your applications and how to do this. Luckily, when building an application with React, many great libraries can help you with testing.

In this chapter, you'll use two libraries to unit test React applications. The first one is Jest, which is maintained by Facebook itself and ships with Create React App. The other tool is called Enzyme, which has more functionality than Jest and can be used to test entire life cycles within your components. Together, they are a great fit...