Focus Management
π¨βπΌ Great work! This is a much more pleasant form to work with. That code you
wrote looks pretty nice and reusable.
π― Hmmm... If you have some extra time, try to move the
useEffect
hook into
a reusable useFocusInvalid
hook. I should be able to use it like this:useFocusInvalid(formRef.current, hasErrors)