React Fundamentals

0% completed

Previous
Next
Code Challenge

Challenge: Autofocus input

Follow these instructions to complete your challenge:

  1. Create a functional component called FocusInput in the App.jsx file.
  2. Use the useRef hook to create a reference to an <input> element.
  3. Add a button that, when clicked, automatically focuses on the input field.
  4. The input field should be initially empty.

.....

.....

.....

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