What do you do when you need to work with some really bad code? It seems like a no-win situation: whether you rewrite it, do a ""refactoring sprint,"" or just live with it, you have to pay a big cost. But these aren't the only options. There's a way to get control of your code so that you can make whatever improvements you need in a low-stress, low-cost way. To explain how, this talk is split into two parts. In the first part we'll look at a messy React Native component and see how effortless it is to make improvements to the code if you have comprehensive tests. In the second part we'll tackle that big ""if:"" how in the world can you get comprehensive tests like that? By the end of this talk you'll have the information to decide if this approach to testing and refactoring will help your project, and if so, you'll have next steps to hone your skills in this approach.
Josh Justice has worked as a developer for 17 years across mobile, frontend, and backend platforms. He currently serves as the Web Platform Lead at Big Nerd Ranch, a web and mobile development shop in Atlanta, Georgia. He also writes, speaks, and livestreams about React Native, testing, and software design.