Skip to content

Commit 1cb1493

Browse files
committed
Day 3
1 parent bac1aa9 commit 1cb1493

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

App.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
import React from 'react'
22
import { StyleSheet, Text, View } from 'react-native'
33

4-
export default function App() {
5-
return (
6-
<View style={styles.container}>
7-
<Text style={styles.mainText}>
8-
Welcome to Nerdjfpb React Native Series
9-
</Text>
10-
</View>
11-
)
4+
export default class App extends React.Component {
5+
state = {
6+
counter: 0
7+
}
8+
9+
render() {
10+
return (
11+
<View style={styles.container}>
12+
<Text style={styles.mainText}>Counter: {this.state.counter}</Text>
13+
</View>
14+
)
15+
}
1216
}
1317

1418
const styles = StyleSheet.create({

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ You can check the commits to find the part by part codes.
1212

1313
- [Day 1 - React Native Intro](https://www.instagram.com/p/B-EsmshATpS/)
1414
- [Day 2 - Stylesheet in React Native](https://www.instagram.com/p/B-JxJdzlf5E/)
15+
- [Day 3 - State in React Native](https://www.instagram.com/p/B-PK5LmAkKi/)

0 commit comments

Comments
 (0)