Skip to content

Commit eb4a64d

Browse files
committed
refactor: react-native-simple-counter.js
1 parent ef699b6 commit eb4a64d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

solutions/react-native-simple-counter.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useState } from "react"
2-
import { Text, View, StyleSheet, Button } from "react-native"
2+
import { Text, View, StyleSheet } from "react-native"
33

44
const SimpleCounter = () => {
55
const [count, setCount] = useState(0)
@@ -9,11 +9,11 @@ const SimpleCounter = () => {
99
return (
1010
<View style={styles.container}>
1111
<Text style={styles.counter}>
12-
button count: <Text id="actualCount">{count}</Text>
12+
button count: <span id="actualCount">{count}</span>
1313
</Text>
14-
<Button id="mainButton" onPress={increment}>
15-
INCREASE
16-
</Button>
14+
<button id="mainButton" onClick={increment}>
15+
Increase
16+
</button>
1717
</View>
1818
)
1919
}
@@ -26,7 +26,7 @@ const styles = StyleSheet.create({
2626
},
2727
counter: {
2828
textAlign: "center",
29-
marginVertical: 10,
29+
marginVertical: 20,
3030
},
3131
})
3232

0 commit comments

Comments
 (0)