Ver código fonte

fix onSizeUpdated issue for demo

iou90 5 anos atrás
pai
commit
df60571de2
2 arquivos alterados com 9 adições e 2 exclusões
  1. 7
    0
      demo/.eslintrc.js
  2. 2
    2
      demo/App.js

+ 7
- 0
demo/.eslintrc.js Ver arquivo

@@ -1,4 +1,11 @@
1 1
 module.exports = {
2 2
   root: true,
3 3
   extends: '@react-native-community',
4
+  rules: {
5
+    'prettier/prettier': [
6
+      {
7
+        singleQuote: true
8
+      }
9
+    ]
10
+  }
4 11
 };

+ 2
- 2
demo/App.js Ver arquivo

@@ -72,7 +72,7 @@ const Explorer = () => {
72 72
           console.log(result);
73 73
           return true;
74 74
         }}
75
-        onSizeUpdated={heightSize => setHeightSize(heightSize)}
75
+        onSizeUpdated={setHeightSize}
76 76
         source={{ html: heightHtml }}
77 77
         customScript={heightScript}
78 78
         onMessage={event => {
@@ -118,7 +118,7 @@ const Explorer = () => {
118 118
           console.log(result);
119 119
           return true;
120 120
         }}
121
-        onSizeUpdated={widthSize => setWidthSize(widthSize)}
121
+        onSizeUpdated={setWidthSize}
122 122
         source={{ html: widthHtml }}
123 123
         customScript={widthScript}
124 124
       />