Skip to content

Commit e268049

Browse files
[MOB-10402] Improve Example App Code Quality (#779)
* Saparate sample app screens from App.js * Migrate sample class components to hooks * Extract sample buttons into components * Extract reusable Screen component from screens * Add tab bar icons in example app * Extract reusable Section component in example app * Add welcome heading in example app * Move sample app source into `src` directory * Improve primary color selection a11y in sample app * Hide checkmark icon in ColorButton from a11y in sample * Add a11y label to color theme switch in sample * Update survey tokens in sample app * Fix typo in sample's home screen Co-authored-by: Youssef Raafat <[email protected]> * Show welcome header in sample's home screen only * Set default primary color to default blue in sample * Set colorTheme state to enum value instead of boolean * Render invocation events dynamically in sample * More convenient variable names in sample * Use `Alert` API instead of deprecated `alert` in sample * Change components default exports to named exports Co-authored-by: Youssef Raafat <[email protected]>
1 parent 519d86f commit e268049

File tree

15 files changed

+368
-373
lines changed

15 files changed

+368
-373
lines changed

example/App.js

Lines changed: 0 additions & 355 deletions
This file was deleted.

example/android/app/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ project.ext.react = [
8383

8484
apply from: "../../node_modules/react-native/react.gradle"
8585

86+
project.ext.vectoricons = [
87+
iconFontNames: ['Ionicons.ttf']
88+
]
89+
90+
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
91+
8692
/**
8793
* Set this to true to create two separate APKs instead of one:
8894
* - An APK that only works on ARM devices

example/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44

55
import { AppRegistry } from 'react-native';
6-
import App from './App';
6+
import { App } from './src/App';
77
import { name as appName } from './app.json';
88

99
AppRegistry.registerComponent(appName, () => App);

0 commit comments

Comments
 (0)