Skip to content

Support React 15.5+ #28

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 6 additions & 4 deletions ParallaxImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

var isEqual = require('lodash/lang/isEqual');
var React = require('react');
var createReactClass = require('create-react-class');
var PropTypes = require('prop-types');
var {
View,
Image,
Expand All @@ -16,11 +18,11 @@ var {

var WINDOW_HEIGHT = Dimensions.get('window').height;

var ParallaxImage = React.createClass({
var ParallaxImage = createReactClass({
propTypes: {
onPress: React.PropTypes.func,
scrollY: React.PropTypes.object,
parallaxFactor: React.PropTypes.number,
onPress: PropTypes.func,
scrollY: PropTypes.object,
parallaxFactor: PropTypes.number,
imageStyle: Image.propTypes.style,
overlayStyle: View.propTypes.style,
},
Expand Down
6 changes: 4 additions & 2 deletions ParallaxScrollViewComposition.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

var isArray = require('lodash/lang/isArray');
var React = require('react');
var createReactClass = require('create-react-class');
var PropTypes = require('prop-types');
var {
Animated,
ScrollView
Expand All @@ -31,9 +33,9 @@ var applyPropsToParallaxImages = function(children, props) {
};


var ParallaxScrollViewComposition = React.createClass({
var ParallaxScrollViewComposition = createReactClass({
propTypes: {
scrollViewComponent: React.PropTypes.func,
scrollViewComponent: PropTypes.func,
},

setNativeProps: function(nativeProps) {
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
},
"homepage": "https://github.com/oblador/react-native-parallax",
"dependencies": {
"lodash": "^3.10.1"
"create-react-class": "^15.6.2",
"lodash": "^3.10.1",
"prop-types": "^15.6.0"
}
}