Skip to content

Latest commit

 

History

History
9 lines (6 loc) · 1.62 KB

File metadata and controls

9 lines (6 loc) · 1.62 KB

useFocusTrap hard #react #event listeners #hooks

by Pawan Kumar @jsartisan

Take the Challenge

Implement useFocusTrap hook that returns a ref that you we can assign to a DOM element which will trap focus. Anything outside that element, will no longer be able to receive focus.

const { ref } = useFocusTrap();

Back Share your Solutions Check out Solutions