diff --git a/SortableCell.js b/SortableCell.js index 4bec6bc..1f26d32 100644 --- a/SortableCell.js +++ b/SortableCell.js @@ -1,6 +1,6 @@ +import PropTypes from 'prop-types'; import React, { - PropTypes, - Component, + Component } from 'react' import { View, Text, diff --git a/SortableSudokuGrid.js b/SortableSudokuGrid.js index ca722d1..1f8c5c1 100644 --- a/SortableSudokuGrid.js +++ b/SortableSudokuGrid.js @@ -4,10 +4,9 @@ * Released under the MIT license * Copyright (c) 2016 react-native-component */ - +import PropTypes from 'prop-types'; import React, { - PropTypes, - Component, + Component } from 'react' import { View, @@ -138,7 +137,7 @@ class SortableSudokuGrid extends Component { componentWillReceiveProps (nextProps) { let { sortable, dataSource, } = nextProps let { sortable: lastSortable, dataSource: lastDataSource, } = this.props - let newState + let newState = {} if (sortable !== lastSortable) { !newState && (newState = {}) newState.sortable = sortable diff --git a/package.json b/package.json index 5af36ce..ccaea4b 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ }, "homepage": "https://github.com/react-native-component/react-native-smart-sortable-sudoku-grid#readme", "dependencies": { + "prop-types": "^15.6.2", "react-native-smart-timer-enhance": "^1.0.2" } }