Added prop-types package modified listview.js to use it to remove depreciation warning.
This commit is contained in:
parent
7062b48063
commit
a407b43944
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue