
🎉 Congratulations! You saved the turtles, cleaned the beach and rescued the sloths. You built a real React app, and Sharky is very proud of you!
What you learned
| React idea | What it means | Where you used it |
|---|---|---|
| Components | Small pieces of code that each make one part of the screen | Every card in your app |
State (useState) | React’s memory. When it changes, the screen updates | The turtle counter and the trash list |
Events (onClick) | Run a function when something is clicked | Every button |
Lists (.map()) | Show one thing for each item in a list | The trash buttons and the sloth cards |
.filter() | Make a new list without some of the items | Picking up trash |
| Props | Information you hand to a component | name, saved and onRescue for each sloth |
? : and && | Show different things depending on a question | The success messages |
See the finished app
Want to compare your app with ours? This opens the finished app in a new tab. It’s a separate copy, so your own app stays safe in your tab. It also has two bonus cards, the coffee farm and the volcano. You can build those next!
👉 Open the finished app
Keep going
- ☕ Bonus: Coffee farm : follow coffee from the plant to the cup.
- 🌋 Bonus: Arenal volcano : get the animals to safety, with fewer hints.
- 📚 Learn more React on the official React website: react.dev/learn .
- 🗺️ Big challenge: add a new stop to your trip, like Manuel Antonio National Park or Río Celeste. Make a new file in
components, then import it and add its tag inApp.jsx, just like the others.
Keep your app
Your app is only saved in your StackBlitz tab. If you want to keep it, ask an adult to help you sign in to StackBlitz and save your own copy with the Fork button at the top.
As they say in Costa Rica: ¡Pura vida! 🦈