Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Challenge | Getting Started
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
React Tutorial

bookChallenge

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 items with an empty array.
  • Bind the given function handleAddItem in 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.

Solution

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 10

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

bookChallenge

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 items with an empty array.
  • Bind the given function handleAddItem in 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.

Solution

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 10
some-alt