This repository contains code examples and projects based on the book Advanced React. The book is designed to elevate your React knowledge to the next level, covering advanced concepts, strategies, techniques, patterns, and performance optimizations.
The goal of this repository is to help developers master advanced React concepts by providing practical examples, best practices, and strategies. The repository is organized into multiple chapters, where each chapter covers a different topic from the book Advanced React.
Key topics include:
- Advanced React patterns
- Performance optimizations
- Best-practice architectures
- In-depth investigations of React features
Each chapter corresponds to a chapter from the book and is contained in its own folder within the project. These chapters focus on specific React techniques, strategies, or optimizations.
| Chapter | Description |
|---|---|
| Chapter 1 | Introduction to Advanced React Concepts |
| Chapter 2 | Elements, children as props, and re-renders |
| Chapter 3 | Configuration concerns with elements as props |
| Chapter 4 | Advanced configuration with render props |
| Chapter 5 | Memoization with useMemo, useCallback and React.memo |
| Chapter 6 | Deep dive into diffing and reconciliation |
| ... | ... |
This project uses the following tech stack:
- React - A JavaScript library for building user interfaces
- Vite - A fast development server and build tool
- TypeScript - Strongly typed JavaScript
- pnpm - Fast, disk space-efficient package manager
To get started with this project, you can follow these steps:
- Clone the repository:
git clone https://github.com/letStayFoolish/advanced-react
- Install dependencies using pnpm:
pnpm install- Navigate to a specific chapter folder:
cd chapter-01- Run the project:
pnpm run devThe repository is organized with each chapter as a subfolder in the root directory:
├── chapter-01/
│ ├── src/
│ ├── public/
│ └── vite.config.ts
├── chapter-02/
│ ├── src/
│ ├── public/
│ └── vite.config.ts
├── rest of the chapters...
│ ...
└── README.md
Throughout this project, the following best practices are followed:
- Emphasis on clean code and readable architecture
- Use of TypeScript for type safety and maintainability
- Focus on performance optimization with techniques such as memoization, lazy loading, and code splitting
- Implementation of React hooks to simplify state management and side effects
- Following the Component-driven development approach
Contributions are welcome! Please feel free to submit a pull request or open an issue if you have suggestions or improvements.
- Fork the project
- Create a feature branch
- Commit your changes
- Open a pull request
This repository is licensed under the MIT License.