Lesson 29 of 30
97%
Project: Scoreboard
Build a tiny scoreboard. You will use components, props, state, lists, forms, and a little derived data.
Type this into your Vite app. Then change it.
The data
Each player has an id, a name, and a score.
javascript
Show the list
javascript
Add a point
javascript
Add a player
javascript
javascript
Derived total
Do not store total in state. Compute it.
javascript
Put it together
javascript
Fill in plus and add from the snippets above.
Then try a minus button, a reset, and a sort by score.
Tip: If plus does not update, you mutated a player object. Spread a new one.
Test yourself
Three quick questions made just for this lesson. Earn 10 XP per correct answer.