Skip to content

Commit 97ffdc4

Browse files
committed
Upgrade to React Native 0.4.4
1 parent 78f8c02 commit 97ffdc4

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

index.ios.js

+14-9
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,24 @@
55
var React = require('react-native');
66
var {
77
View,
8-
PropTypes
8+
PropTypes,
9+
requireNativeComponent
910
} = React;
1011

1112
var safeHtml = require('safe-html');
1213
var _ = require('underscore');
1314

14-
var createReactIOSNativeComponentClass = require('createReactIOSNativeComponentClass');
15-
16-
var _HTMLWebView = createReactIOSNativeComponentClass({
17-
validAttributes: {html: true, enableScroll: true},
18-
uiViewClassName: 'AIBHTMLWebView'
19-
})
2015

16+
var _HTMLWebView = React.createClass({
17+
propTypes: {
18+
html: PropTypes.string,
19+
enableScroll: PropTypes.bool
20+
},
21+
render: function () {
22+
return <NativeHTMLWebView {...this.props}/>;
23+
}
24+
});
25+
var NativeHTMLWebView = requireNativeComponent('AIBHTMLWebView', _HTMLWebView);
2126

2227
var HTMLWebView = React.createClass({
2328
propTypes: {
@@ -30,8 +35,6 @@ var HTMLWebView = React.createClass({
3035
autoHeight: PropTypes.bool
3136
},
3237

33-
34-
3538
shouldComponentUpdate: function (nextProps, nextState) {
3639
return !_.isEqual(nextProps, this.props) || !_.isEqual(nextState, this.state);
3740
},
@@ -91,6 +94,8 @@ var HTMLWebView = React.createClass({
9194
}
9295
});
9396

97+
98+
9499
module.exports = HTMLWebView;
95100

96101
// Allow a few more things than the default config for safe-html since

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-html-webview",
3-
"version": "0.0.8",
3+
"version": "0.0.9",
44
"description": "Display (possibly untrusted) HTML using a UIWebView in React Native.",
55
"main": "index.ios.js",
66
"scripts": {
@@ -25,7 +25,7 @@
2525
},
2626
"homepage": "https://github.com/almost/react-native-html-webview",
2727
"peerDepenencies": {
28-
"react-native": "^0.4.1"
28+
"react-native": "^0.4.4"
2929
},
3030
"dependencies": {
3131
"safe-html": "0.0.2"

0 commit comments

Comments
 (0)