Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Commit 44810a7

Browse files
committed
Fixes for PropTypes and React.createClass deprecation changes in React-Native
1 parent 843e911 commit 44810a7

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"dependencies": {
1111
"fbjs": "~0.8.9",
1212
"immutable": "~3.7.6",
13+
"create-react-class": "15.6.0",
1314
"prop-types": "^15.5.10",
1415
"react-timer-mixin": "^0.13.2",
1516
"rebound": "^0.0.13"

src/Navigator.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ var React = require('react');
4848
var Subscribable = require('./Subscribable');
4949
var TimerMixin = require('react-timer-mixin');
5050

51+
var createReactClass = require('create-react-class');
5152
var clamp = require('./clamp');
5253
var invariant = require('fbjs/lib/invariant');
5354
var rebound = require('rebound');
@@ -298,7 +299,7 @@ var GESTURE_ACTIONS = [
298299
* See `Navigator.SceneConfigs` for default animations and more info on
299300
* available [scene config options](docs/navigator.html#configurescene).
300301
*/
301-
var Navigator = React.createClass({
302+
var Navigator = createReactClass({
302303

303304
propTypes: {
304305
/**

src/NavigatorBreadcrumbNavigationBar.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ class NavigatorBreadcrumbNavigationBar extends React.Component {
9393
titleContentForRoute: PropTypes.func,
9494
iconForRoute: PropTypes.func,
9595
}),
96-
navState: React.PropTypes.shape({
97-
routeStack: React.PropTypes.arrayOf(React.PropTypes.object),
98-
presentedIndex: React.PropTypes.number,
96+
navState: PropTypes.shape({
97+
routeStack: PropTypes.arrayOf(PropTypes.object),
98+
presentedIndex: PropTypes.number,
9999
}),
100100
style: ViewPropTypes.style,
101101
};

0 commit comments

Comments
 (0)