Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redux tutorial #22

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
43 changes: 32 additions & 11 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,34 @@
import { createStackNavigator } from 'react-navigation-stack';
import { createAppContainer } from 'react-navigation';
import Home from './src/home'
import Playground from './src/playground';

const AppStack = createStackNavigator({
Home: Home,
Playground: Playground
});

export default createAppContainer(AppStack);
import React from 'react';
import { createStackNavigator } from '@react-navigation/stack';
import FoodForm from './src/foodForm';
import FoodList from './src/foodList';
import { NavigationContainer } from '@react-navigation/native';

const Stack = createStackNavigator();

export default AppStack = () =>
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name="FoodForm"
component={FoodForm}
options={{
title: 'Cheetah Coding',
headerTintColor: 'orange',
headerStyle: {
backgroundColor: 'black'
}
}}
/>
<Stack.Screen
name="FoodList"
component={FoodList}
options={{
headerTintColor: 'orange',
headerStyle: {
backgroundColor: 'black'
}
}}
/>
</Stack.Navigator>
</NavigationContainer>
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ android {
}

dependencies {
implementation project(':react-native-vector-icons')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+" // From node_modules

Expand Down
Binary file added android/app/src/main/assets/fonts/AntDesign.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Entypo.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/EvilIcons.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Feather.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Fontisto.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Foundation.ttf
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Ionicons.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Octicons.ttf
Binary file not shown.
Binary file not shown.
Binary file added android/app/src/main/assets/fonts/Zocial.ttf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.oblador.vectoricons.VectorIconsPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.soloader.SoLoader;
Expand Down
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
rootProject.name = 'CwC_React_Native'
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
13 changes: 12 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
import React from 'react';
import { AppRegistry } from 'react-native';
import App from './App';
import { name as appName } from './app.json';
import { Provider } from 'react-redux';

AppRegistry.registerComponent(appName, () => App);
import configureStore from './src/store';

const store = configureStore();

const ReduxTutorial = () =>
<Provider store={store}>
<App />
</Provider>

AppRegistry.registerComponent(appName, () => ReduxTutorial);
147 changes: 85 additions & 62 deletions ios/CwC_React_Native.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

21 changes: 20 additions & 1 deletion ios/CwC_React_Native/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</dict>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<string/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
Expand All @@ -53,5 +53,24 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIAppFonts</key>
<array>
<string>AntDesign.ttf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
<string>Fontisto.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>Octicons.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Zocial.ttf</string>
</array>
</dict>
</plist>
14 changes: 3 additions & 11 deletions ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Uncomment the next line to define a global platform for your project

# platform :ios, '9.0'
# platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'CwC_React_Native' do
Expand Down Expand Up @@ -34,6 +34,8 @@ target 'CwC_React_Native' do
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

target 'CwC_React_NativeTests' do
inherit! :search_paths
# Pods for testing
Expand All @@ -42,13 +44,3 @@ target 'CwC_React_Native' do
use_native_modules!
end

target 'CwC_React_Native-tvOS' do
# Pods for CwC_React_Native-tvOS

target 'CwC_React_Native-tvOSTests' do
inherit! :search_paths
# Pods for testing
end

end

Loading