From the course: React: Ecosystems

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Testing and debugging

Testing and debugging - React.js Tutorial

From the course: React: Ecosystems

Testing and debugging

- As you develop your application, you'll probably spend a lot of time trying to figure out why it isn't working the way you want, finding where you missed something or tracking down a syntax error or typo. Anyway, you get my drift. The point is, application development almost never goes smoothly. This is where the tools for debugging and testing come into play. Luckily, there are several tools built around React to test and debug your site or application. I like to use the React developer tools and Jest. The React developer tools come to the rescue, for example, when I need to inspect my components to figure out what the state of my application is, or when I need to see what my state object looks like, or when I need to see what props are being passed to my component. It's built on top of your browser's developer tools, and it will let you see all this information and more. I use Jest to test whether a component properly renders with snapshots, which are great for UI tests. When you…

Contents