From f2eaad5d139ec9669b4fb6e6d599d68f6cfa5554 Mon Sep 17 00:00:00 2001 From: Siddharth Jain Date: Fri, 1 Sep 2017 17:56:25 +0530 Subject: [PATCH 1/3] onChange not required anymore --- src/rating.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rating.js b/src/rating.js index 5e71d49..40ba7ea 100644 --- a/src/rating.js +++ b/src/rating.js @@ -51,7 +51,7 @@ export default class Rating extends PureComponent { static propTypes = { max: PropTypes.number, initial: PropTypes.number, - onChange: PropTypes.func.isRequired, + onChange: PropTypes.func, config: PropTypes.shape({ easing: PropTypes.func.isRequired, duration: PropTypes.number.isRequired @@ -68,6 +68,7 @@ export default class Rating extends PureComponent { static defaultProps = { max: 5, initial: 0, + onChange: () => {}, config: { easing: Easing.elastic(1), duration: 400 From c5eb73f50e3beb1bd00979eeaa3fbc340b13fc81 Mon Sep 17 00:00:00 2001 From: Siddharth Jain Date: Fri, 1 Sep 2017 17:56:42 +0530 Subject: [PATCH 2/3] 2.0.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8dc4d65..5848aa0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-rating", - "version": "2.0.2", + "version": "2.0.3", "description": "A stars rating component for react-native built with the Animated API", "main": "./src/rating.js", "scripts": { From 922b80ae76a172152a326740163c2ec978c0595d Mon Sep 17 00:00:00 2001 From: Siddharth Jain Date: Fri, 1 Sep 2017 17:57:30 +0530 Subject: [PATCH 3/3] fix readme --- readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index ea91908..8ad2eba 100644 --- a/readme.md +++ b/readme.md @@ -47,7 +47,7 @@ Refer to the `propTypes` and `defaultProps` definition below: static propTypes = { max: PropTypes.number, initial: PropTypes.number, - onChange: PropTypes.func.isRequired, + onChange: PropTypes.func, config: PropTypes.shape({ easing: PropTypes.func.isRequired, duration: PropTypes.number.isRequired @@ -64,6 +64,7 @@ static propTypes = { static defaultProps = { max: 5, initial: 0, + onChange: () => {}, config: { easing: Easing.elastic(1), duration: 400