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.
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 10
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Incrível!
Completion taxa melhorada para 3.13
Challenge
Deslize para mostrar o 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.
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 10