From e944437d31156bf822f46ec1209ae1d3b989242c Mon Sep 17 00:00:00 2001 From: amkayondo Date: Mon, 25 Nov 2019 22:42:26 +0300 Subject: [PATCH 1/2] update component names --- index.js | 4 ++-- package.json | 2 +- readme.md | 8 +++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index fc9d939..9906dbf 100644 --- a/index.js +++ b/index.js @@ -60,7 +60,7 @@ export default class Carousel extends Component { this._handleScrollEnd = this._handleScrollEnd.bind(this); } - componentWillMount() { + UNSAFE_componentWillMount() { this._calculateGap(this.props); } @@ -68,7 +68,7 @@ export default class Carousel extends Component { this._resetScrollPosition(false); } - componentWillReceiveProps(nextProps) { + UNSAFE_componentWillReceiveProps(nextProps) { this.setState({ currentPage: nextProps.currentPage diff --git a/package.json b/package.json index ff07cb1..8ca0f4d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "react-native-carousel-control", + "name": "@amkayondo/react-native-carousel-control", "version": "2.0.1", "description": "React Native Carousel control with support for iOS and Android.", "main": "index.js", diff --git a/readme.md b/readme.md index 4702630..ad25013 100644 --- a/readme.md +++ b/readme.md @@ -9,13 +9,15 @@ React < 16 -> 1.x.x ## Installation ``` -npm install react-native-carousel-control --save +Previous Version - npm install react-native-carousel-control --save +``` +``` +Latest Version - npm install @amkayondo/react-native-carousel-control --save ``` - ## Usage ``` -import Carousel from "react-native-carousel-control"; +import Carousel from "@amkayondo/react-native-carousel-control"; //... Hello From 60b2f3d00ec6b58eeb27fff8afcfa82342801128 Mon Sep 17 00:00:00 2001 From: Kayondo Edward <46356108+amkayondo@users.noreply.github.com> Date: Mon, 25 Nov 2019 23:05:57 +0300 Subject: [PATCH 2/2] Update readme remove unnecessary details --- readme.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/readme.md b/readme.md index ad25013..9e3fcb1 100644 --- a/readme.md +++ b/readme.md @@ -11,13 +11,10 @@ React < 16 -> 1.x.x ``` Previous Version - npm install react-native-carousel-control --save ``` -``` -Latest Version - npm install @amkayondo/react-native-carousel-control --save -``` ## Usage ``` -import Carousel from "@amkayondo/react-native-carousel-control"; +import Carousel from "react-native-carousel-control"; //... Hello @@ -95,4 +92,4 @@ How much users have to swipe to go to the next/prev page. Default: 0.5 (half the The MIT License (MIT) -Copyright (c) 2016 Gustavo Machado . \ No newline at end of file +Copyright (c) 2016 Gustavo Machado .