diff --git a/README.md b/README.md index f324001..8f27c2e 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ For example, the branch [02-basics](https://github.com/academind/react-native-pr You can switch branches via the dropdown in the top left corner of this repository page: -[Selecting a branch](./selecting-branches.png) +![Selecting a branch](./selecting-branches.png) # Provided Resources diff --git a/code/01-first-app/App.js b/code/01-first-app/App.js new file mode 100644 index 0000000..6a9cb0d --- /dev/null +++ b/code/01-first-app/App.js @@ -0,0 +1,20 @@ +import { StatusBar } from 'expo-status-bar'; +import { StyleSheet, Text, View } from 'react-native'; + +export default function App() { + return ( + + Hello World!!!! + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: '#fff', + alignItems: 'center', + justifyContent: 'center', + }, +}); diff --git a/code/01-first-app/app.json b/code/01-first-app/app.json new file mode 100644 index 0000000..9a1223e --- /dev/null +++ b/code/01-first-app/app.json @@ -0,0 +1,32 @@ +{ + "expo": { + "name": "RNCourse", + "slug": "RNCourse", + "version": "1.0.0", + "orientation": "portrait", + "icon": "./assets/icon.png", + "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" + } + } +} diff --git a/code/01-first-app/assets/adaptive-icon.png b/code/01-first-app/assets/adaptive-icon.png new file mode 100644 index 0000000..03d6f6b Binary files /dev/null and b/code/01-first-app/assets/adaptive-icon.png differ diff --git a/code/01-first-app/assets/favicon.png b/code/01-first-app/assets/favicon.png new file mode 100644 index 0000000..e75f697 Binary files /dev/null and b/code/01-first-app/assets/favicon.png differ diff --git a/code/01-first-app/assets/icon.png b/code/01-first-app/assets/icon.png new file mode 100644 index 0000000..a0b1526 Binary files /dev/null and b/code/01-first-app/assets/icon.png differ diff --git a/code/01-first-app/assets/splash.png b/code/01-first-app/assets/splash.png new file mode 100644 index 0000000..0e89705 Binary files /dev/null and b/code/01-first-app/assets/splash.png differ diff --git a/code/01-first-app/babel.config.js b/code/01-first-app/babel.config.js new file mode 100644 index 0000000..2900afe --- /dev/null +++ b/code/01-first-app/babel.config.js @@ -0,0 +1,6 @@ +module.exports = function(api) { + api.cache(true); + return { + presets: ['babel-preset-expo'], + }; +}; diff --git a/code/01-first-app/package.json b/code/01-first-app/package.json new file mode 100644 index 0000000..a56b658 --- /dev/null +++ b/code/01-first-app/package.json @@ -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": "~44.0.0", + "expo-status-bar": "~1.2.0", + "react": "17.0.1", + "react-dom": "17.0.1", + "react-native": "0.64.3", + "react-native-web": "0.17.1" + }, + "devDependencies": { + "@babel/core": "^7.12.9" + }, + "private": true +} diff --git a/extra-files/App.js b/extra-files/App.js new file mode 100644 index 0000000..09f879b --- /dev/null +++ b/extra-files/App.js @@ -0,0 +1,20 @@ +import { StatusBar } from 'expo-status-bar'; +import { StyleSheet, Text, View } from 'react-native'; + +export default function App() { + return ( + + Open up App.js to start working on your app! + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: '#fff', + alignItems: 'center', + justifyContent: 'center', + }, +});