react hooks return component code example
Example: return component from React hook
const Modal = useMemo(() => {
return ({ children }) => getOpenModal && (
<Modal
isOpen={getOpenModal}
const Modal = useMemo(() => {
return ({ children }) => getOpenModal && (
<Modal
isOpen={getOpenModal}