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.
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 10
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Suggested prompts:
Запитайте мені питання про цей предмет
Сумаризуйте цей розділ
Покажіть реальні приклади
Awesome!
Completion rate improved to 3.13
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.
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 10