Fixing #1191 - prop-types depreciation warning (#1250)

Added prop-types package modified listview.js to use it to remove depreciation warning.
This commit is contained in:
agerson 2017-08-29 04:51:36 -04:00 committed by Kristian Dupont
parent 7062b48063
commit a407b43944
2 changed files with 4 additions and 2 deletions

View File

@ -83,6 +83,7 @@
"nan": "^2.3.3",
"node-fetch": "^1.6.3",
"node-pre-gyp": "^0.6.30",
"prop-types": "^15.5.10",
"request": "^2.78.0",
"sync-request": "^3.0.1",
"url-parse": "^1.1.7"

View File

@ -19,6 +19,7 @@
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import { ListView as BaseListView } from 'react-native';
function hashObjects(array) {
@ -196,8 +197,8 @@ export default class ListView extends React.Component {
}
ListView.propTypes = {
dataSource: React.PropTypes.instanceOf(ListViewDataSource).isRequired,
renderRow: React.PropTypes.func.isRequired,
dataSource: PropTypes.instanceOf(ListViewDataSource).isRequired,
renderRow: PropTypes.func.isRequired,
};
ListView.DataSource = ListViewDataSource;