Mantra: Actively Seek Feedback

The spirit of TDD extends beyond writing tests before you write code. The goal of TDD is to set up a constructive feedback loop for yourself, to identify potential problems quickly and give yourself the freedom to explore potential improvements. Tests are only a means to that end. Sometimes, you’ll want to set tests aside and focus on other sources of feedback. The important thing is to always think ahead: before you start writing a piece of code, ask yourself what the most valuable feedback you could receive for that code would be. Then take steps to make it a reality. In other words: “actively seek feedback.”

In this chapter, you learned how to use the styled-components library to create components with integrated, extensible, fully testable styles. You also added some powerful new tools to your belt, including webpack-dev-server, stylelint, and Jest snapshots. Each of these tools give you more options for seeking feedback as you work. Whenever you find yourself stuck, ask if you might be focusing on the wrong kind of feedback.

In the next chapter, you’ll learn about higher-order components (HOCs), a technique for making React code reusable and keeping individual components from growing too complex.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.187.233