Explore Library
ReactPatterns & Best Practices

72 items

1

Component Composition with children Prop

Slides / Video
2

Render Prop Rendered as Element

Code Quiz
3

Container Forgets to Pass Data

Code Quiz
4

PropTypes and TypeScript for Type Safety

Slides / Video
5

Immutability in State Updates

Slides / Video
6

Separating Business Logic from UI

Slides / Video
7

Small Single-Responsibility Components

Slides / Video
8

Naming Conventions for Components and Files

Slides / Video
9

Folder and File Organization Strategies

Slides / Video
10

Three React Anti-Patterns to Avoid

Slides / Video
11

Deriving State Instead of Duplicating

Slides / Video
12

Colocating State Near Usage

Slides / Video
13

React.memo for Component Memoization

Slides / Video
14

Compound Component Pattern

Slides / Video
15

Proper Use of Keys in Lists

Slides / Video
16

Conditional Rendering Best Practices

Slides / Video
17

Lifting State Up

Slides / Video
18

Deriving State Instead of Duplicating

Quiz
19

Higher-Order Components Basics

Quiz
20

Container vs Presentational Components

Quiz
21

Compound Components Pattern

Quiz
22

Controlled vs Uncontrolled Inputs

Quiz
23

Lifting State Up

Quiz
24

Prop Drilling and Context

Quiz
25

Fragments Avoid Wrapper Divs

Quiz
26

Composition over Inheritance

Quiz
27

Component Folder Structure

Quiz
28

Single Responsibility Components

Quiz
29

Render Props Pattern

Quiz
30

Colocating State

Quiz
31

Immutable State Updates

Quiz
32

Error Boundaries

Quiz
33

Inline Functions in Render

Quiz
34

Accessibility in Component Design

Quiz
35

Higher-Order Components (HOCs)

Slides / Video
36

Container/Presentational Pattern

Slides / Video
37

Compound Component Loses Context

Code Quiz
38

Composition Ignores Children

Code Quiz
39

HOC Swallows the Props

Code Quiz
40

Prop Drilling Passes Wrong Name

Code Quiz
41

Controlled Input Without onChange

Code Quiz
42

Lifting State That Stayed Local

Code Quiz
43

Wrong PropType for Callback

Code Quiz
44

Fragment Loses the Key

Code Quiz
45

Modal Rendered Without a Portal

Code Quiz
46

Barrel Export Missing the Component

Code Quiz
47

State Lifted Too High

Code Quiz
48

Component Doing Too Much

Code Quiz
49

Zero Leaks Into the UI

Code Quiz
50

Lazy Component Without Suspense

Code Quiz
51

Card Component Ignores Children

Code Quiz
52

List Key on the Wrong Element

Code Quiz
53

React.memo That Never Memoizes

Code Quiz
54

Inline Object Defeats Memoization

Code Quiz
55

Derived Value Stored in State

Code Quiz
56

Error Boundary as a Function

Code Quiz
57

Fragments to Avoid Wrapper Nodes

Flashcard
58

Extracting Reusable UI Components

Flashcard
59

Provider Pattern for Shared State

Flashcard
60

Default Props and Prop Validation

Flashcard
61

Container/Presentational Pattern

Flashcard
62

Colocating State

Flashcard
63

Small, Focused Components

Flashcard
64

React.memo Best Practices

Flashcard
65

Compound Components Pattern

Flashcard
66

Avoiding Inline Functions/Objects

Flashcard
67

Component File Organization

Flashcard
68

Prop Naming & API Design

Flashcard
69

Deriving State

Flashcard
70

Render Props Pattern

Flashcard
71

Lifting State Up

Flashcard
72

Prop Drilling and Avoiding It

Flashcard
Slides / VideoIntermediate

Component Composition with children Prop

Learn how the children prop lets components wrap and render any content passed between their tags.

Slide 1
1 / 6