Skip to content

Commit

Permalink
Add PropTypes and update dependencies to work with react 16.0.0 (#2532)
Browse files Browse the repository at this point in the history
  • Loading branch information
daviscabral authored and aksonov committed Oct 22, 2017
1 parent 7cb1aa9 commit 64eb030
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 11 deletions.
3 changes: 2 additions & 1 deletion Example/components/NavigationDrawer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import Drawer from 'react-native-drawer';
import { DefaultRenderer, Actions } from 'react-native-router-flux';

Expand Down
2 changes: 1 addition & 1 deletion Example/components/TabView.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import {PropTypes} from "react";
import PropTypes from 'prop-types';
import {StyleSheet, Text, View, ViewPropTypes} from "react-native";
import Button from 'react-native-button';
import { Actions } from 'react-native-router-flux';
Expand Down
6 changes: 4 additions & 2 deletions docs/REDUX_FLUX.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ Now you can access the current scene from any connected component.

```jsx
// components/MyComponent.js
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Text } from 'react-native';
import { connect } from 'react-redux';

Expand All @@ -129,7 +130,8 @@ export default connect(({routes}) => ({routes}))(MyComponent);

```jsx
// components/MyComponent.js
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { Text, View } from 'react-native';
import Button from 'react-native-button'

Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
],
"dependencies": {
"lodash.isequal": "^4.5.0",
"prop-types": "^15.5.10",
"react-native-experimental-navigation": "^0.28.0",
"react-native-tabs": "^1.0.9",
"react-static-container": "^1.0.1"
Expand All @@ -50,9 +51,9 @@
"eslint": "^3.1.1",
"eslint-plugin-react": "^7.1.0",
"jest": "20.0.4",
"react": "16.0.0-alpha.12",
"react-native": "0.45.1",
"react-test-renderer": "16.0.0-alpha.12"
"react": "16.0.0",
"react-native": "0.50.0-rc.1",
"react-test-renderer": "16.0.0"
},
"peerDependencies": {
"react": "*",
Expand Down
3 changes: 2 additions & 1 deletion src/Scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
* LICENSE file in the root directory of this source tree.
*
*/
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { ViewPropTypes, Text } from 'react-native';

export default class extends React.Component {
Expand Down
3 changes: 2 additions & 1 deletion src/Switch.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import TabBar from './TabBar';
import Actions from './Actions';

Expand Down
3 changes: 2 additions & 1 deletion src/TabBar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
Image,
View,
Expand Down
3 changes: 2 additions & 1 deletion src/TabbedView.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { View, StyleSheet, ViewPropTypes } from 'react-native';
import StaticContainer from 'react-static-container';

Expand Down

0 comments on commit 64eb030

Please sign in to comment.