Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PropTypes and update dependencies to work with react 16.0.0 #2532

Merged
merged 1 commit into from
Oct 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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