 Challenge
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.
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 10
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Suggested prompts:
Mi faccia domande su questo argomento
Riassuma questo capitolo
Mostri esempi dal mondo reale
Awesome!
Completion rate improved to 3.13 Challenge
Challenge
Scorri per mostrare il menu
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.
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 10