()
| 4 | import { SecureWindow } from "@bufgix/react-native-secure-window"; |
| 5 | |
| 6 | export default function App() { |
| 7 | const [counter, setCounter] = useState(0); |
| 8 | |
| 9 | return ( |
| 10 | <View style={styles.container}> |
| 11 | <SecureWindow style={{ flex: 1 }}> |
| 12 | <Image |
| 13 | source={{ |
| 14 | uri: "https://reactnative.dev/img/tiny_logo.png", |
| 15 | }} |
| 16 | style={{ width: 100, height: 100, alignSelf: "center" }} |
| 17 | /> |
| 18 | <Text style={{ marginTop: 50 }}> |
| 19 | This text is protected by the SecureWindow |
| 20 | </Text> |
| 21 | <Text>Counter: {counter}</Text> |
| 22 | <Button |
| 23 | title="Increment" |
| 24 | onPress={() => { |
| 25 | setCounter(counter + 1); |
| 26 | }} |
| 27 | /> |
| 28 | </SecureWindow> |
| 29 | |
| 30 | <Text style={{ marginTop: 100 }}> |
| 31 | This text is not protected by the SecureWindow |
| 32 | </Text> |
| 33 | </View> |
| 34 | ); |
| 35 | } |
| 36 | |
| 37 | const styles = StyleSheet.create({ |
| 38 | container: { |
nothing calls this directly
no outgoing calls
no test coverage detected