React
Patterns & Best Practices
79 lessons in React
- Props spreading and forwarding patternsCode Quiz
- Higher-Order Components (HOC) patternFlashcard
- Render Props PatternSlides / Video
- 0 && x renders 0: use a real booleanQuiz
- Why key={index} breaks row stateQuiz
- Why key={index} breaks row stateFlashcard
- 0 && x renders 0: use a real booleanFlashcard
- Component Composition with children PropSlides / Video
- Container Forgets to Pass DataCode Quiz
- Render Prop Rendered as ElementCode Quiz
- PropTypes and TypeScript for Type SafetySlides / Video
- Immutability in State UpdatesSlides / Video
- Separating Business Logic from UISlides / Video
- Small Single-Responsibility ComponentsSlides / Video
- Naming Conventions for Components and FilesSlides / Video
- Folder and File Organization StrategiesSlides / Video
- Three React Anti-Patterns to AvoidSlides / Video
- Deriving State Instead of DuplicatingSlides / Video
- Colocating State Near UsageSlides / Video
- React.memo for Component MemoizationSlides / Video
- Compound Component PatternSlides / Video
- Proper Use of Keys in ListsSlides / Video
- Conditional Rendering Best PracticesSlides / Video
- Lifting State UpSlides / Video
- Deriving State Instead of DuplicatingQuiz
- Single Responsibility ComponentsQuiz
- Accessibility in Component DesignQuiz
- Compound Components PatternQuiz
- Immutable State UpdatesQuiz
- Inline Functions in RenderQuiz
- Colocating StateQuiz
- Controlled vs Uncontrolled InputsQuiz
- Render Props PatternQuiz
- Error BoundariesQuiz
- Component Folder StructureQuiz
- Prop Drilling and ContextQuiz
- Fragments Avoid Wrapper DivsQuiz
- Higher-Order Components BasicsQuiz
- Container vs Presentational ComponentsQuiz
- Lifting State UpQuiz
- Composition over InheritanceQuiz
- Higher-Order Components (HOCs)Slides / Video
- Container/Presentational PatternSlides / Video
- HOC Swallows the PropsCode Quiz
- Controlled Input Without onChangeCode Quiz
- Lifting State That Stayed LocalCode Quiz
- Compound Component Loses ContextCode Quiz
- Composition Ignores ChildrenCode Quiz
- Prop Drilling Passes Wrong NameCode Quiz
- Barrel Export Missing the ComponentCode Quiz
- Component Doing Too MuchCode Quiz
- State Lifted Too HighCode Quiz
- Modal Rendered Without a PortalCode Quiz
- Fragment Loses the KeyCode Quiz
- Wrong PropType for CallbackCode Quiz
- Error Boundary as a FunctionCode Quiz
- Lazy Component Without SuspenseCode Quiz
- Zero Leaks Into the UICode Quiz
- Inline Object Defeats MemoizationCode Quiz
- Card Component Ignores ChildrenCode Quiz
- React.memo That Never MemoizesCode Quiz
- List Key on the Wrong ElementCode Quiz
- Derived Value Stored in StateCode Quiz
- Extracting Reusable UI ComponentsFlashcard
- Provider Pattern for Shared StateFlashcard
- Default Props and Prop ValidationFlashcard
- Fragments to Avoid Wrapper NodesFlashcard
- Prop Drilling and Avoiding ItFlashcard
- Compound Components PatternFlashcard
- Deriving StateFlashcard
- Lifting State UpFlashcard
- Container/Presentational PatternFlashcard
- Avoiding Inline Functions/ObjectsFlashcard
- Colocating StateFlashcard
- Component File OrganizationFlashcard
- Small, Focused ComponentsFlashcard
- Prop Naming & API DesignFlashcard
- React.memo Best PracticesFlashcard
- Render Props PatternFlashcard