Created
June 11, 2019 19:29
-
-
Save mykltronn/0f5f380395f079c5be1bc60ac885e96b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { | |
View, | |
TouchableOpacity, | |
Text, | |
NativeModules | |
} from "react-native"; | |
const Test = props => { | |
const fail = () => { | |
// NativeModules exposes our package! | |
// Our package exposes our @ReacMethod annotated methods! | |
NativeModules.ImmersiveMode.fail(); | |
} | |
return ( | |
<View style={{ flex: 1 }}> | |
<TouchableOpacity | |
style={{ backgroundColor: "red", width: 100, height: 50}} | |
onPress={fail}> | |
<Text>Fail</Text> | |
</TouchableOpacity> | |
</View> | |
); | |
}; | |
export default Test; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment