Skip to main content
Version: 7.0.x

useSoftInputHeightChanged

useSoftInputHeightChanged is a shortcut for using AvoidSoftInput.onSoftInputHeightChange method inside useEffect.

Parameters

TypeRequiredDescription
({ softInputHeight }: { softInputHeight: number }) => voidyesfunction called with current soft input height when soft input is displayed

Example

import { useSoftInputHeightChanged } from "react-native-avoid-softinput";

useSoftInputHeightChanged(({ softInputHeight }) => {
// Do sth
});