Skip to content

Commit d16a54c

Browse files
committed
init redux_saga sample project
0 parents  commit d16a54c

Some content is hidden

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

59 files changed

+26845
-0
lines changed

.buckconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
[android]
3+
target = Google Inc.:Google APIs:23
4+
5+
[maven_repositories]
6+
central = https://repo1.maven.org/maven2

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Windows files
2+
[*.bat]
3+
end_of_line = crlf

.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: '@react-native-community',
4+
};

.flowconfig

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
[ignore]
2+
; We fork some components by platform
3+
.*/*[.]android.js
4+
5+
; Ignore "BUCK" generated dirs
6+
<PROJECT_ROOT>/\.buckd/
7+
8+
; Ignore polyfills
9+
node_modules/react-native/Libraries/polyfills/.*
10+
11+
; Flow doesn't support platforms
12+
.*/Libraries/Utilities/LoadingView.js
13+
14+
[untyped]
15+
.*/node_modules/@react-native-community/cli/.*/.*
16+
17+
[include]
18+
19+
[libs]
20+
node_modules/react-native/interface.js
21+
node_modules/react-native/flow/
22+
23+
[options]
24+
emoji=true
25+
26+
exact_by_default=true
27+
28+
module.file_ext=.js
29+
module.file_ext=.json
30+
module.file_ext=.ios.js
31+
32+
munge_underscores=true
33+
34+
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
35+
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
36+
37+
suppress_type=$FlowIssue
38+
suppress_type=$FlowFixMe
39+
suppress_type=$FlowFixMeProps
40+
suppress_type=$FlowFixMeState
41+
42+
[lints]
43+
sketchy-null-number=warn
44+
sketchy-null-mixed=warn
45+
sketchy-number=warn
46+
untyped-type-import=warn
47+
nonstrict-import=warn
48+
deprecated-type=warn
49+
unsafe-getters-setters=warn
50+
unnecessary-invariant=warn
51+
signature-verification-failure=warn
52+
53+
[strict]
54+
deprecated-type
55+
nonstrict-import
56+
sketchy-null
57+
unclear-type
58+
unsafe-getters-setters
59+
untyped-import
60+
untyped-type-import
61+
62+
[version]
63+
^0.149.0

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.bat text eol=crlf

.gitignore

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Xcode
6+
#
7+
build/
8+
*.pbxuser
9+
!default.pbxuser
10+
*.mode1v3
11+
!default.mode1v3
12+
*.mode2v3
13+
!default.mode2v3
14+
*.perspectivev3
15+
!default.perspectivev3
16+
xcuserdata
17+
*.xccheckout
18+
*.moved-aside
19+
DerivedData
20+
*.hmap
21+
*.ipa
22+
*.xcuserstate
23+
24+
# Android/IntelliJ
25+
#
26+
build/
27+
.idea
28+
.gradle
29+
local.properties
30+
*.iml
31+
32+
# node.js
33+
#
34+
node_modules/
35+
npm-debug.log
36+
yarn-error.log
37+
38+
# BUCK
39+
buck-out/
40+
\.buckd/
41+
*.keystore
42+
!debug.keystore
43+
44+
# fastlane
45+
*/fastlane/report.xml
46+
*/fastlane/Preview.html
47+
*/fastlane/screenshots
48+
49+
# Bundle artifact
50+
*.jsbundle
51+
52+
# CocoaPods
53+
/ios/Pods/

.prettierrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
bracketSpacing: false,
3+
jsxBracketSameLine: true,
4+
singleQuote: true,
5+
trailingComma: 'all',
6+
arrowParens: 'avoid',
7+
};

.watchmanconfig

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

App.js

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

__tests__/App-test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import 'react-native';
2+
import React from 'react';
3+
import App from '../App';
4+
5+
import renderer from 'react-test-renderer';
6+
7+
it('renders correctly', () => {
8+
renderer.create(<App />);
9+
});

0 commit comments

Comments
 (0)