import { useEffect , useState } from 'react' ; export const ANIMATION_SWITCH_DELAY_MS = 1000 ; export function useAnimateSplit ( ) { const [ animateSplit , setAnimateSplit ] = useState ( false ) ; useEffect ( ( ) => { setTimeout ( ( ) => { setAnimateSplit ( true ) ; } , ANIMATION_SWITCH_DELAY_MS ) ; } , [ ] ) ; return animateSplit ; }