react-native-screens
Version:
Native navigation primitives for your React Native app.
13 lines (10 loc) • 299 B
text/typescript
import { BackHandler, Platform } from 'react-native';
export const isSearchBarAvailableForCurrentPlatform = [
'ios',
'android',
].includes(Platform.OS);
export function executeNativeBackPress() {
// This function invokes the native back press event
BackHandler.exitApp();
return true;
}