React Fundamentals

0% completed

Previous
Next
Code Challenge

Challenge: Live Name Preview

Follow these instructions to complete your challenge:

  1. Create a functional component called NamePreview in the App.jsx file.
  2. Add an <input> field where the user can type their name.
  3. Store the input value in a state variable.
  4. Display the name in real-time below the input field.
  5. If the input is empty, show "Type your name..." as a placeholder text.

Expected Output:

Image

.....

.....

.....

Like the course? Get enrolled and start learning!
Previous
Next