Day 65— Section 68: Component Design
This section used a dice game to explore a bigger React idea: good component design is about clear responsibilities, state ownership, and predictable data flow—not simply splitting code into smaller files.
1
8
The section also reinforced derived values and immutable updates.
isWinner is calculated from dice instead of stored separately. BoxGrid uses map() with an updater to create a new array rather than mutating the existing state.
1
4
My takeaway: React component design is about deciding who owns state, what should be derived, and how data and actions move through the tree.
Data flows down through props; function props let children request actions.
#LearningInPublic #CodingJourney #WebDevelopment #TellerOne
4
Day 65 — Section 67: Intermediate State Concepts
State becomes more useful when updates depend on previous state, when data is stored in objects and arrays, and when multiple updates are queued. This section connected those ideas into practical patterns.
1
7
The Score Keeper exercise combined these ideas with an array of scores. Its index keys are acceptable because the player list is fixed, never reordered, and has no per-player state.
That would not make index keys safe for EmojiClicker, where items can be deleted.
1
2
My takeaway: intermediate state is about choosing the right update pattern.
Updaters handle queued changes. Initializers avoid unnecessary work. Immutable object/array updates give React new references to work with.
#LearningInPublic #CodingJourney #WebDevelopment #TellerOne
2
