Hide components when keyboard is shown
npm install react-native-hide-with-keyboardDevices screen are small especially when the keyboard takes half the space,
when you're working with forms for instance.
One of the best way to handle that is to hide part of the view when the keyboard
shows up.
npm install -S react-native-hide-with-keyboard
`Use it
`javascript
import HideWithKeyboard from 'react-native-hide-with-keyboard';...
render() {
return (
Hidden when keyboard is shown
Never hidden
)
}
`$3
In the case that you want to do the opposite, there is also ShowWithKeyboard which only shows a component when the keyboard is displayed. To use this, instead importĀ react-native-hide-with-keyboard like so:
`javascript
import { HideWithKeyboard, ShowWithKeyboard } from 'react-native-hide-with-keyboard';
``