Skip to content
This repository has been archived by the owner on Jun 28, 2019. It is now read-only.

Commit

Permalink
Fix PropTypes to support React 16 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
engvik authored Nov 2, 2017
1 parent 650dc18 commit 0dfdd85
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 40 deletions.
8 changes: 2 additions & 6 deletions lib/Anim.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import React, {
PropTypes
} from 'react';
import ReactNative, {
LayoutAnimation
} from 'react-native';
import PropTypes from 'prop-types';
import ReactNative, { LayoutAnimation } from 'react-native';

export default PropTypes.shape({
duration: PropTypes.number,
Expand Down
13 changes: 5 additions & 8 deletions lib/LazyloadImage.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import React, {
Component,
PropTypes
} from 'react';
import {
Image,
Platform
} from 'react-native';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Image, Platform } from 'react-native';

import LazyloadView from './LazyloadView';
import Anim from './Anim';

const emptySource = {uri:'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'};

class LazyloadImage extends LazyloadView{
Expand Down
11 changes: 4 additions & 7 deletions lib/LazyloadListView.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import React, {
Component,
PropTypes
} from 'react';
import {
ListView
} from 'react-native';
import PropTypes from 'prop-types';
import React, { Components } from 'react';
import { ListView } from 'react-native';
import ScrollableMixin from 'react-native-scrollable-mixin';

import LazyloadScrollView from './LazyloadScrollView';

class LazyloadListView extends Component{
Expand Down
12 changes: 4 additions & 8 deletions lib/LazyloadScrollView.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import React, {
Component,
PropTypes
} from 'react';
import ReactNative, {
ScrollView,
Dimensions
} from 'react-native';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import ReactNative, { ScrollView, Dimensions } from 'react-native';
import ScrollableMixin from 'react-native-scrollable-mixin';

import LazyloadManager from './LazyloadManager';

class LazyloadScrollView extends Component{
Expand Down
12 changes: 4 additions & 8 deletions lib/LazyloadView.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import React, {
Component,
PropTypes
} from 'react';
import {
View,
LayoutAnimation
} from 'react-native';
import PropTypes from 'prop-types';
import React, { Component} from 'react';
import { View, LayoutAnimation } from 'react-native';

import LazyloadManager from './LazyloadManager';
import Anim from './Anim';

Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "react-native-lazyload",
"name": "react-native-lazyload-deux",
"version": "1.1.0",
"description": "lazyload for react native",
"description": "Lazyload for React Native",
"license": "MIT",
"main": "./index.js",
"repository": {
"type": "git",
"url": "https://github.com/magicismight/react-native-lazyload"
"url": "https://github.com/soldotno/react-native-lazyload-deux"
},
"dependencies": {
"prop-types": "^15.6.0",
"react-native-scrollable-mixin": "^1.0.1"
},
"keywords": [
Expand Down

0 comments on commit 0dfdd85

Please sign in to comment.