Skip to content

Instantly share code, notes, and snippets.

@spit4520
Created March 18, 2021 17:15
Show Gist options
  • Save spit4520/43e38458f63887c718c5e7dda81c0fe1 to your computer and use it in GitHub Desktop.
Save spit4520/43e38458f63887c718c5e7dda81c0fe1 to your computer and use it in GitHub Desktop.
//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