Permalink
Browse files

Upgrade to React Native 0.4.4

  • Loading branch information...
almost committed May 18, 2015
1 parent 78f8c02 commit 97ffdc4b72a3a798792e98edc9aac40a679bc729
Showing with 16 additions and 11 deletions.
  1. +14 −9 index.ios.js
  2. +2 −2 package.json
View
@@ -5,19 +5,24 @@
var React = require('react-native');
var {
View,
PropTypes
PropTypes,
requireNativeComponent
} = React;
var safeHtml = require('safe-html');
var _ = require('underscore');
var createReactIOSNativeComponentClass = require('createReactIOSNativeComponentClass');
var _HTMLWebView = createReactIOSNativeComponentClass({
validAttributes: {html: true, enableScroll: true},
uiViewClassName: 'AIBHTMLWebView'
})
var _HTMLWebView = React.createClass({
propTypes: {
html: PropTypes.string,
enableScroll: PropTypes.bool
},
render: function () {
return <NativeHTMLWebView {...this.props}/>;
}
});
var NativeHTMLWebView = requireNativeComponent('AIBHTMLWebView', _HTMLWebView);
var HTMLWebView = React.createClass({
propTypes: {
@@ -30,8 +35,6 @@ var HTMLWebView = React.createClass({
autoHeight: PropTypes.bool
},
shouldComponentUpdate: function (nextProps, nextState) {
return !_.isEqual(nextProps, this.props) || !_.isEqual(nextState, this.state);
},
@@ -91,6 +94,8 @@ var HTMLWebView = React.createClass({
}
});
module.exports = HTMLWebView;
// Allow a few more things than the default config for safe-html since
View
@@ -1,6 +1,6 @@
{
"name": "react-native-html-webview",
"version": "0.0.8",
"version": "0.0.9",
"description": "Display (possibly untrusted) HTML using a UIWebView in React Native.",
"main": "index.ios.js",
"scripts": {
@@ -25,7 +25,7 @@
},
"homepage": "https://github.com/almost/react-native-html-webview",
"peerDepenencies": {
"react-native": "^0.4.1"
"react-native": "^0.4.4"
},
"dependencies": {
"safe-html": "0.0.2"

0 comments on commit 97ffdc4

Please sign in to comment.