P4.6: React Refs & useRef

The useRef hook preserves values across component renders without triggering a new render lifecycle when changed.


🎓 Practice Assignment Tasks

  • Create a text input.
  • Add a button that programmatically focuses the text input when clicked using a ref.
Stuck? Hints available
<!-- Write your HTML structure here to complete the assignment -->
🔒 Code requirements not met yet. Complete the tasks above.
🔒 Complete the Practice Assignment above to unlock completion.
Advertisement
NS
Ask Nextsem
AI Mode
NS
Home
Course
Playground