How to create custom Hooks in Reactjs
Custom hook is a function that uses one or more of the built-in React hooks (useState, useEffect, useRef, etc.)
Here, we pass one UIBox as cHook content. Based on Boolean value it's hide and show while click on button CTA.
The cHook is a simple custom hook that takes content.
Code for Custom Hook