-
Notifications
You must be signed in to change notification settings - Fork 2
/
App.js
35 lines (32 loc) · 893 Bytes
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import React from 'react';
import {StyleSheet, View, Text, Button, NativeModules} from 'react-native';
import Second_Screen from "./Second_Screen";
export default class App extends React.Component{
constructor(){
super();
this.state = {
visible: false,
}
}
render(){
return (
<View>
<Text>I am From the Main App File of React Native</Text>
<Button
title="Navigate Me"
onPress={() => {
NativeModules.MyModule.NavigateMe();
}}
/>
<Button
title="Second Screen"
onPress={() => {
this.setState({visible: true})
}}
/>
<Second_Screen visible = {this.state.visible}/>
</View>
);
}
};
const styles = StyleSheet.create({});