Design Principles: Build an Understandable & Change-Ready React Codebase!
Download this ebook to:
Learn how to build an understandable and change-ready React codebase
If you work in React projects, you’ve probably seen this:
Long blocks of code that use many variables and allow complex execution paths. In short, React components are doing way more than they should.
Putting together pieces of code that perform distinct tasks is a problem because it inhibits code reusability, makes testing difficult, and increases the time required to understand the code.
Solution? The Single Responsibility Principle.
Read this ebook to see how following the Single Responsibility Principle allows building a React codebase that is easy to understand and ready for changes. To show you how it works in practice, we are going to refactor a fat React component into smaller pieces, each with its very own, single responsibility.
What’s inside?
Table of contents:
1 Why the Single Responsibility Principle?
2 Chapter 1: Refactoring a React component
3 Chapter 2: Extracting the data fetching functionality
4 Chapter 3: Refactoring the data fetching service
5 Chapter 4: Freeing the component from data fetching management
6 Conclusion
Download the ebook
Author
Jacek Mikrut
Front-end Developer
Jacek is a front-end developer. He earned a MSc degree in Computer Science from the Silesian University of Technology and has since worked as a full-stack developer for a number of companies, today focusing on front-end applications. Passionate about best practices in software development processes and opportunities offered by the newest web application technologies.