What this book covers
In Chapter 1, Introducing React Anti-Patterns, you’ll get a closer look at the hurdles of building user interfaces, handling state management, addressing “unhappy paths,” and identifying common anti-patterns in React.
In Chapter 2, Understanding React Essentials, you will delve into the basics of React covering static components, props, UI breakdown, state management, the rendering process, and common React Hooks to lay a solid foundation for subsequent chapters.
In Chapter 3, Organizing Your React Application, you will learn about different types of project structures in React, exploring their advantages, drawbacks, and practical applications.
In Chapter 4, Designing your React Components, you will learn to identify common anti-patterns in React component design and explore fundamental design principles including the Single Responsibility Principle and Don’t Repeat Yourself to improve component structure.
In Chapter 5, Testing in React, you will learn about the significance of software testing, explore various types of tests such as unit, integration, and end-to-end testing, and get acquainted with popular testing tools including Cypress and Jest, setting a strong foundation for complex testing scenarios in React applications.
In Chapter 6, Exploring Common Refactoring Techniques, you will learn about the essence of refactoring and delve into various refactoring techniques, such as Rename Variable, Extract Variable, and Replace Loop with Pipeline, to enhance code maintainability and readability.
In Chapter 7, Introducing Test-Driven Development with React, you’ll learn the core principles of test-driven development through a practical example, while building various features of a pizza store’s menu page in a React application.
In Chapter 8, Exploring Data Management in React, you’ll delve into the common challenges of state management in React, such as business logic leaks and prop drilling, and explore solutions including employing an Anti-Corruption Layer and utilizing the React context API to enhance code maintainability and user experience.
In Chapter 9, Applying Design Principles in React, you’ll revisit the Single Responsibility Principle, embrace the Dependency Inversion Principle, and understand the application of Command and Query Responsibility Segregation in React to fortify your knowledge of key design principles to aid you in mastering React.
In Chapter 10, Diving Deep into Composition Patterns, you’ll delve into composition through higher-order components and custom Hooks, and explore the headless component pattern. You’ll gain an appreciation of composition techniques for creating scalable, maintainable, and user-friendly UIs in React.
In Chapter 11, Introducing Layered Architecture in React, you’ll explore Layered Architecture, delve into Application Concern Layers, define data models, and learn strategy patterns through a practical example, understanding their significance for large-scale applications.
In Chapter 12, Implementing an End-To-End Project, you’ll traverse the complete process of developing a weather application, from understanding requirements to implementing features such as City Search and Add To Favourite, while ensuring the code remains maintainable, understandable, and extensible.
In Chapter 13, Recapping Anti-Pattern Principles, we’ll take a concise look back at common anti-patterns, React design patterns, and fundamental principles, and recap the techniques and practices discussed earlier in the book, providing a succinct refresher before you continue applying these insights to your own projects.