import { useEffect } from "react" ; import { HigherOrderComponent , useAdmin } from "~/index" ; export interface ProviderProps { hoc : HigherOrderComponent ; } param hoc constructor export const Provider = ( { hoc } ) => { const { addProvider } = useAdmin ( ) ; useEffect ( ( ) => { return addProvider ( hoc ) ; } , [ ] ) ; return null ; } ;