Преглед на файлове

fix onSizeUpdated issue for demo

iou90 преди 5 години
родител
ревизия
df60571de2
променени са 2 файла, в които са добавени 9 реда и са изтрити 2 реда
  1. 7
    0
      demo/.eslintrc.js
  2. 2
    2
      demo/App.js

+ 7
- 0
demo/.eslintrc.js Целия файл

@@ -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 Целия файл

@@ -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
       />