Skip to content

Instantly share code, notes, and snippets.

@tahaziadeh
tahaziadeh / KeyboardHandler.js
Last active June 28, 2017 00:33 — forked from dbasedow/KeyboardHandler.js
Keyboard spacing solution for react-native based on the stackoverflow answer http://stackoverflow.com/a/33585501/1783214
// Based on dbasedow/KeyboardHandler.js
/**
* Based on http://stackoverflow.com/a/33585501/1783214
*
* Handle resizing enclosed View and scrolling to input
* Usage:
* <KeyboardHandler ref='kh' offset={50} >
* <View>
* ...
* <TextInput ref='username'