Challenge: Live Name Preview
Follow these instructions to complete your challenge:
- Create a functional component called
NamePreview
in the App.jsx
file.
- Add an
<input>
field where the user can type their name.
- Store the input value in a state variable.
- Display the name in real-time below the input field.
- If the input is empty, show "Type your name..." as a placeholder text.
Expected Output: