The single hardest part of front-end development at scale is making changes to code and understanding all of the visual and behavioral effects that will occur as a result.
When you build a component, tests should be written that expose each state a component can be in. This test should generate a static html file and a corresponding image for every discrete state a component can be in.