Question: I have a login screen created using react-native.

How can I shift my screen up when the user is typing in the textInput?

Do I listen to the onFocus() event and use css styling to change the style of the view?

Answer: 
In 2017 (RN 0.43) there is special component for this: [KeyboardAvoidingView](https://reactnative.dev/docs/keyboardavoidingview)
Night Fury's answer is pretty good, though wouldn't fuss with the ScrollView's `contentOffset`, I'd use the `ScrollResponder`:

```jsx
render() {
  return (
    <ScrollView ref="myScrollView">
      <TextInput
        ref="myInput"
        onFocus={this._scrollToInput.bind(this)}
      />
    </ScrollView>
  );
}

_scrollToInput {
  const scrollResponder = this.refs.myScrollView.getScrollResponder();
  const inputHandle = React.findNodeHandle(this.refs.myInput)

  scrollResponder.scrollResponderScrollNativeHandleToKeyboard(
    inputHandle, // The TextInput node handle
    0, // The scroll view's bottom "contentInset" (default 0)
    true // Prevent negative scrolling
  );
}

```

See the method definition: [scrollResponderScrollNativeHandleToKeyboard](https://github.com/facebook/react-native/blob/71f32fb5a34f3841621abbeed8fe6f50b32402be/Libraries/Components/ScrollResponder.js#L434-L453)