Chapter 6 : React State Management

State and properties have a relationship with each other. When we work with React applications, we gracefully compose components that are tied together based on this relationship. When the state of a component tree changes, so do the properties. The new data flows through the tree, causing specific leaves and branches to render to reflect the new content.

Samples

Star Rating

  • Five Stars Rendered - (run it)

  • Star Component with Props - (run it)

  • Star Component with State - (run it)

  • Completed Star Component - (run it)

  • Advanced Star Component - (run it)

Color Organizer

  • Feature: Display Color Data - (run it)

  • Features: Remove Color, Rate Color - (run it)

  • Feature: Add Color Component with Refs - (run it)

  • Refactor: Add Color Controlled Component - (run it)

  • Refactor: useInput hook - (run it)

  • Feature: Adding a Color to State - (run it)

  • Refactor: Colors In Context - (run it)

  • Refactor: useColors hook - (run it)

  • BONUS: Color Organizer App (with emotion css)- (run it)

Last updated