React 15 · Project
Final project: Kanban
Put everything together into one app.
Loading lesson…
React 15 · Project
Put everything together into one app.
Loading lesson…
Nobody builds a house by hanging the curtains first and then looking for where to put the walls. The order is the opposite: a plan (where the rooms will be), the foundations, the shell, then the wiring and plumbing – and the furniture last. Each phase stands on the previous one, and when the foundations are done well, the upper floors hold up on their own.
An app is built the same way:
Now it's time to put everything together. Build a Kanban board – a small but real app that uses most of what you've learned. Work through the milestones and tick each one off.
Before you tackle the whole kanban, warm up on its smallest part – a single card.
Task is in the comments in the code below – at the top of the file and at the places marked TODO.
row, stack, card, list, btn, input or muted are the course's ready-made styles in src/styles.css (row = side by side, stack = stacked, card = bordered box, muted = grey text).Loading the interactive part…
Before you start writing, think about these questions. Each one matches an image from the course: a notebook (state), a bank account (reducer), a loudspeaker (Context), a drawer (ref), the light in a room (effect). The reference solution picks the answers in the right-hand column – yours may differ.
| Question | Reference solution | Why |
|---|---|---|
| Where do the cards live? | useReducer + Context | Many different actions on the same data (the bank account), and several components need it (the loudspeaker). State and dispatch in separate contexts. |
| Do I store the column in the card, or the cards in the columns? | column in the card, a flat array | Moving = changing one value, no copying between arrays. The card counts in the columns are simply computed. |
| Where is the search text? | Local useState in Board | A thing in one component's pocket. In an app with a router it would belong in the address (the wish list for a room). |
| A card edit in progress? | A local draft in the modal | Papers on the desk: it goes to the "bank" only after Save, so Cancel doesn't have to undo anything. |
| How does undo work? | A history in the reducer | The reducer is the only place where changes happen – the bank statement comes for free. |
| Persistence? | An effect syncs cards → localStorage | localStorage is the outside world (the light in the room); the reducer's lazy initialization loads it on start. |
What the board should do is set out by the milestones above and the TODO comments in the code. Try the reference solution in the "Reference solution" tab – it's saved to localStorage, so it survives a reload.
Medium and hard challenges unlock once you sign in. Like the whole course, they are free – just an e-mail, no password and no payment.