Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
1a7cab6
Unwrapped the starter project and ran npm i
DimmyMaenhout Dec 7, 2025
212ec09
section-2-Getting-Started: completed until point 17 (React Native: Co…
DimmyMaenhout Dec 7, 2025
31bfc33
section-2-Getting-Started: Completed until point 22
DimmyMaenhout Dec 7, 2025
98838b2
section-2-Getting-Started: Completed until point 24 (Managing a List …
DimmyMaenhout Dec 7, 2025
1c20db3
section-2-Getting-Started: Completed until point 27 (Optimizing Lists…
DimmyMaenhout Dec 7, 2025
f638056
section-2-Getting-Started: completed until point 33 (Adding an Androi…
DimmyMaenhout Dec 7, 2025
a44359b
section-2-Getting-Started: Finished section 2
DimmyMaenhout Dec 7, 2025
3f3ad7b
section-3-Debugging: Unwrapped the starter project and ran npm install
DimmyMaenhout Dec 7, 2025
09f682b
section 4: Unwrapped the starter project and ran npm i
DimmyMaenhout Dec 7, 2025
2becc66
section-4: Completed until point 54 (Improving the buttons)
DimmyMaenhout Dec 7, 2025
a237808
section-4: Completed until point 56 (Adding a Linear Gradient)
DimmyMaenhout Dec 8, 2025
7038428
section-4: Added a background image and made sure the LinearGradient …
DimmyMaenhout Dec 8, 2025
5a7ac04
section-4: Completed until point 59 (Handling user input & showing an…
DimmyMaenhout Dec 8, 2025
0310ae5
section-4: Completed until point 62 (Respecting Device Screen Restric…
DimmyMaenhout Dec 8, 2025
b38d467
section-4: Completed until point 64 (Managing colors globally)
DimmyMaenhout Dec 8, 2025
91347bc
section-4: Completed until point 66 (Adding Game Control buttons + & …
DimmyMaenhout Dec 8, 2025
f4adc16
section-4: Completed until point 67 (Checking for "game over")
DimmyMaenhout Dec 8, 2025
320d61e
section-4: Completed until point 71 (Adding & Using Custom Fonts with…
DimmyMaenhout Dec 8, 2025
13f5c3d
section-4: Completed until point 73 (Using & Styling Nested Text)
DimmyMaenhout Dec 8, 2025
119b2ff
section-4: Completed point 74 (Adding logic to (re-)start games and d…
DimmyMaenhout Dec 8, 2025
805ff26
section-4: Finished section 4
DimmyMaenhout Dec 8, 2025
458f1e2
section-5: Unwrapped the starter project and ran npm i
DimmyMaenhout Dec 8, 2025
7353b43
section-5: Completed until point 85 (Setting sizes dynamically for di…
DimmyMaenhout Dec 8, 2025
c205636
section-5 Completed until point 86 (Managing Screen content with Keyb…
DimmyMaenhout Dec 8, 2025
15330a1
section-5: Completed until point 87 (Improving the Landscape mode UI)
DimmyMaenhout Dec 8, 2025
139025a
section-5: Completed until point 88 (Further improvement with useWind…
DimmyMaenhout Dec 8, 2025
57d17d8
section-5: Finished section 5
DimmyMaenhout Dec 8, 2025
a613e86
section-6: Unwrapped the starter project and ran npm i
DimmyMaenhout Dec 8, 2025
2cf35ce
section-6: completed until point 94 (Displaying items in a grid)
DimmyMaenhout Dec 8, 2025
1c73193
section-6: Added packages for navigation
DimmyMaenhout Dec 8, 2025
12be302
section-6: completed until point 95 (Getting started with the React N…
DimmyMaenhout Dec 8, 2025
a600b52
section-6: Completed until point 96 (Implementing navigation between …
DimmyMaenhout Dec 8, 2025
c5da3a7
section-6: Completed until point 99 (Working with Route parameters to…
DimmyMaenhout Dec 8, 2025
d44c1b6
section-6: Added comment concerning navigation and route which can be…
DimmyMaenhout Dec 8, 2025
7d3dcc2
section-6: Completed until point 101 (Adding Images & Styling)
DimmyMaenhout Dec 8, 2025
c3dea38
section-6: Completed to point 102 (Styling screen headers & backgrounds)
DimmyMaenhout Dec 8, 2025
714d98e
section-6: Completed to point 103 (Setting navigation options dynamic…
DimmyMaenhout Dec 8, 2025
574b200
section-6: completed to point 104 (Adding & configuring the meal deta…
DimmyMaenhout Dec 8, 2025
ecbe61f
section-6: Completed to point 106 (Finishing the MealDetailScreen)
DimmyMaenhout Dec 8, 2025
b193de6
section-6: Completed to point 107 (Adding Header Buttons)
DimmyMaenhout Dec 9, 2025
833272c
section-6: Completed to point 108 (Adding an Icon button to a header)
DimmyMaenhout Dec 9, 2025
2cd9aed
section-6: Unwrapped the 11-other-navigators-starting-code project an…
DimmyMaenhout Dec 9, 2025
aa44010
section-6: point 109 (Adding drawer navigation & creating a drawer)
DimmyMaenhout Dec 9, 2025
ed4f4ce
section-6: Completed to point 110 (Configuring the Drawer Navigator &…
DimmyMaenhout Dec 9, 2025
be66d7b
section-6: point 111 installed the @react-navigation/bottom-tabs package
DimmyMaenhout Dec 9, 2025
51d354a
section-6: Completed point 111
DimmyMaenhout Dec 9, 2025
71eda8f
section-6: Completed point 112 (Nested Navigators)
DimmyMaenhout Dec 9, 2025
f5023d4
section-6: Finsihed
DimmyMaenhout Dec 9, 2025
7d3ac77
section-7: Unwrapped the starter project and ran npm install
DimmyMaenhout Dec 9, 2025
49b61b0
section-7: Completed to point 119 (Managing favorite meals with the C…
DimmyMaenhout Dec 9, 2025
0b8819f
section-7: point 120 (Getting Started with Redux & Redux Toolkit)
DimmyMaenhout Dec 9, 2025
0e482b4
section: 7 Completed
DimmyMaenhout Dec 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions attachments/02-basics/00-starting-project/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import { useState } from 'react';
import { Button, FlatList, StyleSheet, View } from 'react-native';
import GoalItem from './components/GoalItem';
import GoalInput from './components/GoalInput';
import { StatusBar } from 'expo-status-bar';

export default function App() {
const [courseGoals, setCourseGoals] = useState([]);
const [modalIsVisible, setModalIsVisible] = useState(false);

function startAddGoalHandler() {
setModalIsVisible(true);
}

function endAddGoalHandler() {
setModalIsVisible(false);
}

function addGoalHandler(enteredGoalText) {
console.log(enteredGoalText);
setCourseGoals((prev) => [
...prev,
{ text: enteredGoalText, id: Math.random().toString() }
]);
endAddGoalHandler();
}

function deleteGoalHandler(id) {
setCourseGoals((prev) => {
return prev.filter((goal) => goal.id !== id);
});
}

return (
<>
<StatusBar style='light' />
<View style={styles.appContainer}>
<Button
title='Add New Goal'
color='#a065ec'
onPress={startAddGoalHandler}
/>
<GoalInput
onAddGoal={addGoalHandler}
visible={modalIsVisible}
onCancel={endAddGoalHandler}
/>
<View style={styles.goalsContainer}>
<FlatList
data={courseGoals}
renderItem={(itemData) => (
<GoalItem
text={itemData.item.text}
id={itemData.item.id}
onDeleteItem={deleteGoalHandler}
/>
)}
keyExtractor={(item, index) => {
return item.id;
}}
alwaysBounceVertical={false}
></FlatList>
</View>
</View>
</>
);
}

// Besides auto-completion, the StyleSheet object aslo provides validation.
// If you would use invalid style properties or values, you would get an error/warning.
const styles = StyleSheet.create({
appContainer: {
flex: 1,
paddingTop: 50,
paddingHorizontal: 16
},
goalsContainer: {
flex: 5
}
});
31 changes: 31 additions & 0 deletions attachments/02-basics/00-starting-project/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"expo": {
"name": "RNCourse",
"slug": "RNCourse",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"backgroundColor": "#1e085a",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
}
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions attachments/02-basics/00-starting-project/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};
79 changes: 79 additions & 0 deletions attachments/02-basics/00-starting-project/components/GoalInput.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import { useState } from 'react';
import {
View,
TextInput,
Button,
StyleSheet,
Modal,
Image
} from 'react-native';

export default function GoalInput(props) {
const [enteredGoalText, setEnteredGoalText] = useState('');

function goalInputHandler(enteredText) {
setEnteredGoalText(enteredText);
}

function addGoalHandler() {
props.onAddGoal(enteredGoalText);
setEnteredGoalText('');
}

return (
<Modal visible={props.visible} animationType='slide'>
<View style={styles.inputContainer}>
<Image
style={styles.image}
source={require('../assets/images/goal.png')}
/>
<TextInput
style={styles.textInput}
placeholder='Your course goal!'
onChangeText={goalInputHandler}
value={enteredGoalText}
/>
<View style={styles.buttonContainer}>
<View style={styles.button}>
<Button title='Cancel' onPress={props.onCancel} color='#f31282' />
</View>
<View style={styles.button}>
<Button title='Add Goal' onPress={addGoalHandler} color='#b180f0' />
</View>
</View>
</View>
</Modal>
);
}

const styles = StyleSheet.create({
inputContainer: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
padding: 16,
backgroundColor: '#311b6b'
},
image: {
width: 100,
height: 100,
margin: 20
},
textInput: {
borderWidth: 1,
borderColor: '#e4d0ff',
backgroundColor: '#e4d0ff',
color: '#120438',
borderRadius: 6,
width: '100%',
padding: 16
},
buttonContainer: {
marginTop: 8,
flexDirection: 'row'
},
button: {
width: 100,
marginHorizontal: 8
}
});
29 changes: 29 additions & 0 deletions attachments/02-basics/00-starting-project/components/GoalItem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Text, StyleSheet, Pressable } from 'react-native';

function GoalItem(props) {
return (
// bind is a standard JS function which basically allows you pre-configure a function for future execution
<Pressable
android_ripple={{ color: '#dddddd' }}
onPress={props.onDeleteItem.bind(this, props.id)}
style={({ pressed }) => pressed && styles.pressedItem}
>
<Text style={styles.goalItem}>{props.text}</Text>;
</Pressable>
);
}

export default GoalItem;

const styles = StyleSheet.create({
goalItem: {
margin: 8,
padding: 8,
borderRadius: 6,
backgroundColor: '#5e0acc',
color: 'white'
},
pressedItem: {
opacity: 0.5
}
});
24 changes: 24 additions & 0 deletions attachments/02-basics/00-starting-project/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "rncourse",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"expo": "^52.0.0",
"expo-status-bar": "~2.0.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-native": "0.76.7",
"react-native-web": "~0.19.13"
},
"devDependencies": {
"@babel/core": "^7.25.2"
},
"private": true
}
80 changes: 80 additions & 0 deletions attachments/03-debugging/00-starting-project/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import { useState } from 'react';
import { StyleSheet, View, FlatList, Button } from 'react-native';
import { StatusBar } from 'expo-status-bar';

import GoalItem from './components/GoalItem';
import GoalInput from './components/GoalInput';

export default function App() {
const [modalIsVisible, setModalIsVisible] = useState(false);
const [courseGoals, setCourseGoals] = useState([]);

function startAddGoalHandler() {
setModalIsVisible(true);
}

function endAddGoalHandler() {
setModalIsVisible(false);
}

function addGoalHandler(enteredGoalText) {
setCourseGoals((currentCourseGoals) => [
...currentCourseGoals,
{ text: enteredGoalText, id: Math.random().toString() },
]);
endAddGoalHandler();
}

function deleteGoalHandler(id) {
setCourseGoals((currentCourseGoals) => {
return currentCourseGoals.filter((goal) => goal.id !== id);
});
}

return (
<>
<StatusBar style="light" />
<View style={styles.appContainer}>
<Button
title="Add New Goal"
color="#a065ec"
onPress={startAddGoalHandler}
/>
<GoalInput
visible={modalIsVisible}
onAddGoal={addGoalHandler}
onCancel={endAddGoalHandler}
/>
<View style={styles.goalsContainer}>
<FlatList
data={courseGoals}
renderItem={(itemData) => {
return (
<GoalItem
text={itemData.item.text}
id={itemData.item.id}
onDeleteItem={deleteGoalHandler}
/>
);
}}
keyExtractor={(item, index) => {
return item.id;
}}
alwaysBounceVertical={false}
/>
</View>
</View>
</>
);
}

const styles = StyleSheet.create({
appContainer: {
flex: 1,
paddingTop: 50,
paddingHorizontal: 16,
},
goalsContainer: {
flex: 5,
},
});
33 changes: 33 additions & 0 deletions attachments/03-debugging/00-starting-project/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"expo": {
"name": "RNCourse",
"slug": "RNCourse",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"backgroundColor": "#1e085a",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
}
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions attachments/03-debugging/00-starting-project/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};
Loading