Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Challenge | Getting Started
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

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 10

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

Suggested prompts:

Pregunte me preguntas sobre este tema

Resumir este capítulo

Mostrar ejemplos del mundo real

Awesome!

Completion rate improved to 3.13

bookChallenge

Desliza para mostrar el menú

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

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 10
some-alt