-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
35 lines (32 loc) · 1003 Bytes
/
App.js
File metadata and controls
35 lines (32 loc) · 1003 Bytes
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, {useState} from 'react';
import {StyleSheet, View, Text, Button, TextInput} from 'react-native';
const App = () => {
const [Count, SetCount] = useState(0);
return (
<View>
<View>
<View
style={{alignItems: 'center', justifyContent: 'center', height: 100}}>
<Text style={{fontSize: 20}}> {Count} </Text>
</View>
<View
style={{
marginTop: 20,
display: 'flex',
flexDirection: 'row',
flexWrap: 'wrap',
justifyContent: 'center',
}}>
<View style={{width: 100, display: 'flex', marginLeft: 10}}>
<Button title="Increase" onPress={() => SetCount(Count + 1)} />
</View>
<View style={{width: 100, marginLeft: 10}}>
<Button title="Decrease" onPress={() => SetCount(Count - 1)} />
</View>
</View>
</View>
</View>
);
};
const styles = StyleSheet.create({});
export default App;