Skip to content

Instantly share code, notes, and snippets.

@sloanwolf
sloanwolf / KeyboardHandler.js
Last active October 30, 2016 05:47 — forked from tahaziadeh/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'