When to use useImperativeHandle, useLayoutEffect, and useDebugValue
Allow me to preface this answer by stating that all of these hooks are very rarely used. 99% of the time, you won’t need these. They are only meant to cover some rare corner-case scenarios. useImperativeHandle Usually when you use useRef you are given the instance value of the component the ref is attached to. … Read more