Browse Source

update version to 0.1.0; use react-immutable-component; update example; change name to react-native-autoheight-webview

iou90 7 years ago
parent
commit
0835399fd1

+ 3
- 1
autoHeightWebView/index.android.js View File

16
     WebView
16
     WebView
17
 } from 'react-native';
17
 } from 'react-native';
18
 
18
 
19
+import ImmutableComponent from 'react-immutable-component';
20
+
19
 const RCTAutoHeightWebView = requireNativeComponent('RCTAutoHeightWebView', AutoHeightWebView, { nativeOnly: { messagingEnabled: PropTypes.bool } });
21
 const RCTAutoHeightWebView = requireNativeComponent('RCTAutoHeightWebView', AutoHeightWebView, { nativeOnly: { messagingEnabled: PropTypes.bool } });
20
 
22
 
21
-export default class AutoHeightWebView extends Component {
23
+export default class AutoHeightWebView extends ImmutableComponent {
22
     constructor(props) {
24
     constructor(props) {
23
         super(props);
25
         super(props);
24
         this.onMessage = this.onMessage.bind(this);
26
         this.onMessage = this.onMessage.bind(this);

+ 3
- 1
autoHeightWebView/index.ios.js View File

11
     WebView
11
     WebView
12
 } from 'react-native';
12
 } from 'react-native';
13
 
13
 
14
-export default class AutoHeightWebView extends Component {
14
+import ImmutableComponent from 'react-immutable-component';
15
+
16
+export default class AutoHeightWebView extends ImmutableComponent {
15
     constructor(props) {
17
     constructor(props) {
16
         super(props);
18
         super(props);
17
         this.handleNavigationStateChange = this.handleNavigationStateChange.bind(this);
19
         this.handleNavigationStateChange = this.handleNavigationStateChange.bind(this);

+ 1
- 1
examples/explorer/explorer.js View File

13
     View
13
     View
14
 } from 'react-native';
14
 } from 'react-native';
15
 
15
 
16
-import AutoHeightWebView from 'react-native-autoheightwebview';
16
+import AutoHeightWebView from 'react-native-autoheight-webview';
17
 
17
 
18
 export default class Explorer extends Component {
18
 export default class Explorer extends Component {
19
     constructor(props) {
19
     constructor(props) {

+ 1
- 1
examples/explorer/package.json View File

9
   "dependencies": {
9
   "dependencies": {
10
     "react": "15.4.2",
10
     "react": "15.4.2",
11
     "react-native": "0.40.0",
11
     "react-native": "0.40.0",
12
-    "react-native-autoheightwebview": "file:///Users/iou90/Works/Lab/react-native-autoheightwebview"
12
+    "react-native-autoheight-webview": "file:///Users/iou90/Works/Lab/react-native-autoheight-webview"
13
   },
13
   },
14
   "devDependencies": {
14
   "devDependencies": {
15
     "babel-jest": "18.0.0",
15
     "babel-jest": "18.0.0",

+ 8
- 5
package.json View File

1
 {
1
 {
2
-  "name": "react-native-autoheightwebview",
3
-  "version": "0.0.18",
2
+  "name": "react-native-autoheight-webview",
3
+  "version": "0.1.0",
4
   "description": "An auto height webview for React Native",
4
   "description": "An auto height webview for React Native",
5
   "main": "autoHeightWebView",
5
   "main": "autoHeightWebView",
6
   "files": [
6
   "files": [
12
   },
12
   },
13
   "repository": {
13
   "repository": {
14
     "type": "git",
14
     "type": "git",
15
-    "url": "git+https://github.com/iou90/react-native-autoheightwebview.git"
15
+    "url": "git+https://github.com/iou90/react-native-autoheight-webview.git"
16
   },
16
   },
17
   "author": "iou90",
17
   "author": "iou90",
18
   "license": "ISC",
18
   "license": "ISC",
19
   "bugs": {
19
   "bugs": {
20
-    "url": "https://github.com/iou90/react-native-autoheightwebview/issues"
20
+    "url": "https://github.com/iou90/react-native-autoheight-webview/issues"
21
   },
21
   },
22
-  "homepage": "https://github.com/iou90/react-native-autoheightwebview#readme"
22
+  "homepage": "https://github.com/iou90/react-native-autoheight-webview#readme",
23
+  "dependencies": {
24
+    "react-immutable-component": "0.0.1"
25
+  }
23
 }
26
 }