Skip to content

Commit 9d9acd2

Browse files
authored
Bump dependencies and examples to React Native 0.72 (#405)
1 parent 0f15e1f commit 9d9acd2

File tree

126 files changed

+18479
-18909
lines changed

Some content is hidden

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

126 files changed

+18479
-18909
lines changed

.eslintrc

-24
This file was deleted.

.eslintrc.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
extends: ['airbnb', 'prettier'],
3+
plugins: ['prettier'],
4+
parser: '@babel/eslint-parser',
5+
rules: {
6+
'react/sort-comp': [0],
7+
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
8+
'react/static-property-placement': [0],
9+
'react/destructuring-assignment': [0],
10+
'react/jsx-props-no-spreading': [0],
11+
'import/no-extraneous-dependencies': [0],
12+
'import/no-unresolved': [2, { ignore: ['^react(-native)?$'] }],
13+
'import/extensions': [2, { js: 'never', json: 'always' }],
14+
'prefer-object-spread': [0],
15+
'default-param-last': [0],
16+
},
17+
};

Examples/AnimatableExplorer/.buckconfig

-6
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
22
root: true,
3-
extends: '@react-native-community',
3+
extends: '@react-native',
44
};

Examples/AnimatableExplorer/.flowconfig

-75
This file was deleted.

Examples/AnimatableExplorer/.gitattributes

-1
This file was deleted.

Examples/AnimatableExplorer/.gitignore

+17-10
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,38 @@ 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*
64+
65+
# testing
66+
/coverage
+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module.exports = {
2-
jsxBracketSameLine: true,
2+
arrowParens: 'avoid',
3+
bracketSameLine: true,
4+
bracketSpacing: false,
35
singleQuote: true,
46
trailingComma: 'all',
57
};
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{}
1+
{}

Examples/AnimatableExplorer/AnimationCell.js

-50
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import React, {memo, useCallback, useRef} from 'react';
2+
import {StyleSheet, Text, TouchableWithoutFeedback} from 'react-native';
3+
import {Animation, View} from 'react-native-animatable';
4+
5+
const styles = StyleSheet.create({
6+
cell: {
7+
padding: 16,
8+
marginBottom: 10,
9+
marginHorizontal: 10,
10+
},
11+
name: {
12+
color: 'white',
13+
fontSize: 16,
14+
textAlign: 'center',
15+
},
16+
});
17+
18+
interface AnimationCellProps {
19+
animationType: Animation;
20+
color: string;
21+
onPress: (view: View, animationType: Animation) => void;
22+
useNativeDriver: boolean;
23+
}
24+
25+
export default memo(function AnimationCell({
26+
useNativeDriver,
27+
color,
28+
onPress,
29+
animationType,
30+
}: AnimationCellProps) {
31+
const ref = useRef<View>(null);
32+
const handlePress = useCallback(() => {
33+
if (ref.current && onPress) {
34+
onPress(ref.current, animationType);
35+
}
36+
}, [ref, onPress, animationType]);
37+
38+
return (
39+
<TouchableWithoutFeedback onPress={handlePress}>
40+
<View
41+
ref={ref}
42+
style={[{backgroundColor: color}, styles.cell]}
43+
useNativeDriver={useNativeDriver}>
44+
<Text style={styles.name}>{animationType}</Text>
45+
</View>
46+
</TouchableWithoutFeedback>
47+
);
48+
});

0 commit comments

Comments
 (0)