Skip to content

Instantly share code, notes, and snippets.

@spit4520
Created March 18, 2021 17:15
Show Gist options
  • Save spit4520/2585a470157227c84c4f50e78304af56 to your computer and use it in GitHub Desktop.
Save spit4520/2585a470157227c84c4f50e78304af56 to your computer and use it in GitHub Desktop.
Fix for React Native 63, allows UIManager to be used with the new replacemnt for currentlyFocusedInput
//Replace all currentlyFocusedField with currentlyFocusedInput
import {
findNodeHandle,
UIManager,
TextInput,
} from 'react-native';
const currentlyFocusedField = findNodeHandle(TextInput.State.currentlyFocusedInput());
UIManager.measure(currentlyFocusedField, (originX, originY, width, height, pageX, pageY);
//Not a full example of animation, but I have to get back to work. Hope this helps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment