import { useEffect } from 'react' ; export function usePosterLoader < E extends HTMLDivElement > ( posterElement , onLoad , loading = true ) { useEffect ( ( ) => { if ( posterElement && ! loading ) { onLoad ( posterElement ) ; } } , [ onLoad , posterElement , loading ] ) ; }