Challenge
In this challenge, we will create a react component that adds an item to an HTML list and displays it when a user presses the add button.
Your tasks are as follows:
- Initialize state variable
itemswith an empty array. - Bind the given function
handleAddItemin the constructor. - Loop over the variable items and display each in a list item.
Hints:
- Add it as you do in a JS object.
- Bind using
this.methodname.bind(this)code - Refer to the JSX chapter.
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 10
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Suggested prompts:
Stel mij vragen over dit onderwerp
Vat dit hoofdstuk samen
Toon voorbeelden uit de praktijk
Geweldig!
Completion tarief verbeterd naar 3.13
Challenge
Veeg om het menu te tonen
In this challenge, we will create a react component that adds an item to an HTML list and displays it when a user presses the add button.
Your tasks are as follows:
- Initialize state variable
itemswith an empty array. - Bind the given function
handleAddItemin the constructor. - Loop over the variable items and display each in a list item.
Hints:
- Add it as you do in a JS object.
- Bind using
this.methodname.bind(this)code - Refer to the JSX chapter.
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 10