Unit Testing React Components

1 · Eric Elliott · March 7, 2019, 8:01 p.m.
Photo of a first attempt to test a React component by clement127 (CC BY-NC-ND 2.0)Unit testing is a great discipline which can lead to 40%-80% reductions in production bug density. Unit testing also has several other important benefits:Improves your application architecture and maintainability.Leads to better APIs and composability by focusing developers on the developer experience (API) before implementation details.Provides quick feedback on file-save to tell you whether or not your changes wo...