File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 11import React from 'react'
22import { 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
1418const styles = StyleSheet . create ( {
Original file line number Diff line number Diff 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/ )
You can’t perform that action at this time.
0 commit comments