import { useState } from 'react'; // Custom hook Example const useCustomHook = () => { const [data, setData] = useState(null); const isDataExist = () => { return data !== null; }; return { data, setData, isDataExist, }; }; export type ICustomHook = ReturnType; export default useCustomHook;