Moved from https://github.com/facebook/react-native/issues/4775