Skip to content

Commit b6d0d76

Browse files
committed
chore(example): updated rn version to 0.71
1 parent 42976e3 commit b6d0d76

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+7370
-8130
lines changed

example/.buckconfig

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

example/.eslintignore

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

example/.eslintrc

Lines changed: 4 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,4 @@
1-
{
2-
"root": true,
3-
"extends": [
4-
"defaults",
5-
"airbnb-typescript-prettier",
6-
"prettier"
7-
],
8-
"globals": {
9-
"__DEV__": true
10-
},
11-
"parser": "@typescript-eslint/parser",
12-
"parserOptions": {
13-
"useJSXTextNode": true,
14-
"project": "./tsconfig.json",
15-
"tsconfigRootDir": "."
16-
},
17-
"rules": {
18-
"@typescript-eslint/no-unused-vars": "off",
19-
"unused-imports/no-unused-imports": "error",
20-
"unused-imports/no-unused-vars": [
21-
"warn",
22-
{ "vars": "all", "varsIgnorePattern": "^_", "args": "after-used", "argsIgnorePattern": "^_" }
23-
],
24-
"import-helpers/order-imports": [
25-
"warn",
26-
{
27-
"newlinesBetween": "always",
28-
"groups": [
29-
"/^react/",
30-
"/^@/",
31-
"module",
32-
["parent", "sibling", "index"],
33-
],
34-
"alphabetize": { "order": "asc", "ignoreCase": true }
35-
}
36-
],
37-
"radix": 0,
38-
"no-prototype-builtins": 0,
39-
"no-return-await": 0,
40-
"no-empty": 0,
41-
"no-param-reassign": 0,
42-
"react-hooks/exhaustive-deps": 0,
43-
"react/no-array-index-key": 0,
44-
"react/require-default-props": 0,
45-
"@typescript-eslint/ban-ts-ignore": 0,
46-
"@typescript-eslint/interface-name-prefix": 0,
47-
"react/jsx-props-no-spreading": 0,
48-
"react/function-component-definition": 0,
49-
"react/static-property-placement": 0,
50-
"react/jsx-filename-extension": [
51-
1,
52-
{
53-
"extensions": [
54-
".js",
55-
".jsx",
56-
".ts",
57-
".tsx"
58-
]
59-
}
60-
],
61-
"@typescript-eslint/no-empty-function": 0,
62-
"import/prefer-default-export": 0,
63-
"import/extensions": 0,
64-
"import/named": 0,
65-
"import/no-named-as-default": 0,
66-
"import/no-named-as-default-member": 0
67-
},
68-
"plugins": [
69-
"import",
70-
"jsx-a11y",
71-
"prettier",
72-
"react",
73-
"react-hooks",
74-
"@typescript-eslint",
75-
"import-helpers",
76-
"unused-imports"
77-
],
78-
"settings": {
79-
"import/resolver": {
80-
"node": {
81-
"extensions": [".js", ".ts", ".jsx", ".tsx"],
82-
"paths": ["src"]
83-
}
84-
}
85-
}
86-
}
1+
module.exports = {
2+
root: true,
3+
extends: '@react-native-community',
4+
};

example/.gitattributes

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

example/.gitignore

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23+
ios/.xcode.env.local
2324

2425
# Android/IntelliJ
2526
#
@@ -28,32 +29,35 @@ build/
2829
.gradle
2930
local.properties
3031
*.iml
32+
*.hprof
33+
.cxx/
34+
*.keystore
35+
!debug.keystore
3136

3237
# node.js
3338
#
3439
node_modules/
3540
npm-debug.log
3641
yarn-error.log
3742

38-
# BUCK
39-
buck-out/
40-
\.buckd/
41-
*.keystore
42-
!debug.keystore
43-
4443
# fastlane
4544
#
4645
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
4746
# screenshots whenever they are needed.
4847
# For more information about the recommended setup visit:
4948
# https://docs.fastlane.tools/best-practices/source-control/
5049

51-
*/fastlane/report.xml
52-
*/fastlane/Preview.html
53-
*/fastlane/screenshots
50+
**/fastlane/report.xml
51+
**/fastlane/Preview.html
52+
**/fastlane/screenshots
53+
**/fastlane/test_output
5454

5555
# Bundle artifact
5656
*.jsbundle
5757

58-
# CocoaPods
58+
# Ruby / CocoaPods
5959
/ios/Pods/
60+
/vendor/bundle/
61+
62+
# Temporary files created by Metro to check the health of the file watcher
63+
.metro-health-check*

example/.prettierrc

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
{
2-
"trailingComma": "es5",
3-
"tabWidth": 4,
4-
"semi": false,
5-
"singleQuote": true,
6-
"jsxSingleQuote": true,
7-
"jsxBracketSameLine": true,
8-
"endOfLine": "auto"
9-
}
1+
module.exports = {
2+
arrowParens: 'avoid',
3+
bracketSameLine: true,
4+
bracketSpacing: false,
5+
singleQuote: true,
6+
trailingComma: 'all',
7+
};

example/.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.7.6

example/App.tsx

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
/**
2+
* Sample React Native App
3+
* https://github.com/facebook/react-native
4+
*
5+
* @format
6+
*/
7+
8+
import React from 'react';
9+
import type {PropsWithChildren} from 'react';
10+
import {
11+
SafeAreaView,
12+
ScrollView,
13+
StatusBar,
14+
StyleSheet,
15+
Text,
16+
useColorScheme,
17+
View,
18+
} from 'react-native';
19+
20+
import {
21+
Colors,
22+
DebugInstructions,
23+
Header,
24+
LearnMoreLinks,
25+
ReloadInstructions,
26+
} from 'react-native/Libraries/NewAppScreen';
27+
28+
type SectionProps = PropsWithChildren<{
29+
title: string;
30+
}>;
31+
32+
function Section({children, title}: SectionProps): JSX.Element {
33+
const isDarkMode = useColorScheme() === 'dark';
34+
return (
35+
<View style={styles.sectionContainer}>
36+
<Text
37+
style={[
38+
styles.sectionTitle,
39+
{
40+
color: isDarkMode ? Colors.white : Colors.black,
41+
},
42+
]}>
43+
{title}
44+
</Text>
45+
<Text
46+
style={[
47+
styles.sectionDescription,
48+
{
49+
color: isDarkMode ? Colors.light : Colors.dark,
50+
},
51+
]}>
52+
{children}
53+
</Text>
54+
</View>
55+
);
56+
}
57+
58+
function App(): JSX.Element {
59+
const isDarkMode = useColorScheme() === 'dark';
60+
61+
const backgroundStyle = {
62+
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
63+
};
64+
65+
return (
66+
<SafeAreaView style={backgroundStyle}>
67+
<StatusBar
68+
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
69+
backgroundColor={backgroundStyle.backgroundColor}
70+
/>
71+
<ScrollView
72+
contentInsetAdjustmentBehavior="automatic"
73+
style={backgroundStyle}>
74+
<Header />
75+
<View
76+
style={{
77+
backgroundColor: isDarkMode ? Colors.black : Colors.white,
78+
}}>
79+
<Section title="Step One">
80+
Edit <Text style={styles.highlight}>App.tsx</Text> to change this
81+
screen and then come back to see your edits.
82+
</Section>
83+
<Section title="See Your Changes">
84+
<ReloadInstructions />
85+
</Section>
86+
<Section title="Debug">
87+
<DebugInstructions />
88+
</Section>
89+
<Section title="Learn More">
90+
Read the docs to discover what to do next:
91+
</Section>
92+
<LearnMoreLinks />
93+
</View>
94+
</ScrollView>
95+
</SafeAreaView>
96+
);
97+
}
98+
99+
const styles = StyleSheet.create({
100+
sectionContainer: {
101+
marginTop: 32,
102+
paddingHorizontal: 24,
103+
},
104+
sectionTitle: {
105+
fontSize: 24,
106+
fontWeight: '600',
107+
},
108+
sectionDescription: {
109+
marginTop: 8,
110+
fontSize: 18,
111+
fontWeight: '400',
112+
},
113+
highlight: {
114+
fontWeight: '700',
115+
},
116+
});
117+
118+
export default App;

example/Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source 'https://rubygems.org'
2+
3+
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4+
ruby File.read(File.join(__dir__, '.ruby-version')).strip
5+
6+
gem 'cocoapods', '~> 1.11', '>= 1.11.3'

example/README.md

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

0 commit comments

Comments
 (0)