react-native-gesture-handler 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GestureComponents.js +12 -8
- package/package.json +1 -1
package/GestureComponents.js
CHANGED
@@ -3,17 +3,21 @@ import ReactNative from 'react-native';
|
|
3
3
|
|
4
4
|
import createNativeWrapper from './createNativeWrapper';
|
5
5
|
|
6
|
-
const MEMOIZED =
|
6
|
+
const MEMOIZED = new WeakMap();
|
7
7
|
|
8
8
|
function memoizeWrap(Component, config) {
|
9
|
-
|
10
|
-
|
11
|
-
return memoized;
|
9
|
+
if (Component == null) {
|
10
|
+
return null;
|
12
11
|
}
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
let memoized = MEMOIZED.get(Component);
|
13
|
+
if (!memoized) {
|
14
|
+
memoized = createNativeWrapper(
|
15
|
+
Component,
|
16
|
+
config
|
17
|
+
);
|
18
|
+
MEMOIZED.set(Component, memoized);
|
19
|
+
}
|
20
|
+
return memoized;
|
17
21
|
}
|
18
22
|
|
19
23
|
module.exports = {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-native-gesture-handler",
|
3
|
-
"version": "1.4.
|
3
|
+
"version": "1.4.1",
|
4
4
|
"description": "Experimental implementation of a new declarative API for gesture handling in react-native",
|
5
5
|
"scripts": {
|
6
6
|
"start": "node node_modules/react-native/local-cli/cli.js start",
|