Build a week-view scheduler: a 7-day by 10-hour grid (8:00 to 17:00) where events show up as colored blocks in their time slot. It looks like a lot of moving parts, but the whole thing is driven by one array of events plus a rule for which cell each event belongs to.
The starter App.tsx renders the grid with four seeded events, but nothing is clickable yet. Make it interactive:
useState so the grid re-renders when it changes.day and hour with a fresh id and the title Meeting.Meeting block into that cell.[day, hour], look up whether an event lives there. If one does, render the block; otherwise render a clickable slot.e0 through e3 classes rotate four colors by the event's position — you never pick a color by hand.styles.css; focus on the state and the click handlers.Unlock the solution & editor
Runnable editor + tests
Solve in the browser with instant Jest feedback.
Detailed solutions
Walkthroughs, edge cases, and complexity notes.
Multi-framework variants
React, Vue, Vanilla, Angular — same question, different stacks.