Props Versus State
Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.
The problem
- easy
- Pro
A like button shows a heart and a count of likes. Clicking it adds one to the count. The button's label text is chosen by the page that uses it. Explain which of these values should be props and which should be state, and what happens on screen when the button is clicked.
Talk this problem through with an AI coach
This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.