Refactoring React with Tests

Article by Jack Franklin

As you work on a React application it's highly likely that you'll encounter components that have grown over time. They may have started with just one particular use case in mind, but will have been added to since. This can lead to complex render methods and code that's hard to follow. In this video you'll see how to spot components that need some work doing, how we test these components, and how we use the tests to guide us, splitting one component into two much more straightforward ones.


Related resources

How to (unit) test in React

This guide explains what unit testing is, why it's needed and the best practices for small to large React applications. [continue]

Article by Onoufrios Malikkides

End to End testing React applications

Having a good testing setup, one that allows us to create meaningful tests and is not a painful process, is extremely important to produce quality code. In this talk we will explore the options that we have, and will explain how to leverage webdriver for end-to-end testing React applications. [continue]

Video Talk by Forbes Lindesay

A New Way to Handle Events in React

'Property Initializer Syntax' sounds more fancy than it really is. In this bite-sized tutorial see how this alternative way of writing event handlers will help eliminate boilerplate in your constructor and also defend against frivolous memory usage in your renders. [continue]

Article by William Le

Debugging a Create React App with VS Code

In this video we'll look at how to configure VS Code to debug React components and Jest unit tests inside a web application that was created by create-react-app. [continue]

Video Tutorial by Manorisms