소스 검색

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
 module.exports = {
1
 module.exports = {
2
   root: true,
2
   root: true,
3
   extends: '@react-native-community',
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
           console.log(result);
72
           console.log(result);
73
           return true;
73
           return true;
74
         }}
74
         }}
75
-        onSizeUpdated={heightSize => setHeightSize(heightSize)}
75
+        onSizeUpdated={setHeightSize}
76
         source={{ html: heightHtml }}
76
         source={{ html: heightHtml }}
77
         customScript={heightScript}
77
         customScript={heightScript}
78
         onMessage={event => {
78
         onMessage={event => {
118
           console.log(result);
118
           console.log(result);
119
           return true;
119
           return true;
120
         }}
120
         }}
121
-        onSizeUpdated={widthSize => setWidthSize(widthSize)}
121
+        onSizeUpdated={setWidthSize}
122
         source={{ html: widthHtml }}
122
         source={{ html: widthHtml }}
123
         customScript={widthScript}
123
         customScript={widthScript}
124
       />
124
       />