Something went wrong. Try again.
Mirror — see github.com/blacksky-algorithms/blacksky.community
Something went wrong. Try again.
1234567891011121314151617181920import {useEffect} from 'react'import { Keyboard, type KeyboardEventListener, type KeyboardEventName,} from 'react-native'
export function useOnKeyboard( eventName: KeyboardEventName, cb: KeyboardEventListener,) { useEffect(() => { const subscription = Keyboard.addListener(eventName, cb)
return () => { subscription.remove() } }, [eventName, cb])}