react-share
Advanced tools
Comparing version 3.0.0 to 3.0.1
# Changelog | ||
## 3.0.1 (August 26, 2019) | ||
* Forward `ref` on to the share buttons | ||
* use `componentDidUpdate` instead of `componentWillUpdate` | ||
## 3.0.0 (March 24, 2019) | ||
@@ -4,0 +9,0 @@ |
@@ -231,8 +231,9 @@ import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of'; | ||
var CreatedButton = function CreatedButton(props) { | ||
var CreatedButton = React.forwardRef(function (props, ref) { | ||
return React.createElement(ShareButton, _extends({}, props, { | ||
ref: ref, | ||
network: network, | ||
networkLink: link, | ||
opts: optsMap(props) })); | ||
}; | ||
}); | ||
@@ -239,0 +240,0 @@ CreatedButton.propTypes = propTypes; |
@@ -31,6 +31,6 @@ import _extends from 'babel-runtime/helpers/extends'; | ||
}, { | ||
key: 'componentWillReceiveProps', | ||
value: function componentWillReceiveProps(nextProps) { | ||
if (nextProps.url !== this.props.url) { | ||
this.updateCount(nextProps.url); | ||
key: 'componentDidUpdate', | ||
value: function componentDidUpdate(prevProps) { | ||
if (prevProps.url !== this.props.url) { | ||
this.updateCount(this.props.url); | ||
} | ||
@@ -37,0 +37,0 @@ } |
@@ -273,8 +273,9 @@ 'use strict'; | ||
var CreatedButton = function CreatedButton(props) { | ||
var CreatedButton = _react2.default.forwardRef(function (props, ref) { | ||
return _react2.default.createElement(ShareButton, (0, _extends3.default)({}, props, { | ||
ref: ref, | ||
network: network, | ||
networkLink: link, | ||
opts: optsMap(props) })); | ||
}; | ||
}); | ||
@@ -281,0 +282,0 @@ CreatedButton.propTypes = propTypes; |
@@ -67,6 +67,6 @@ 'use strict'; | ||
}, { | ||
key: 'componentWillReceiveProps', | ||
value: function componentWillReceiveProps(nextProps) { | ||
if (nextProps.url !== this.props.url) { | ||
this.updateCount(nextProps.url); | ||
key: 'componentDidUpdate', | ||
value: function componentDidUpdate(prevProps) { | ||
if (prevProps.url !== this.props.url) { | ||
this.updateCount(this.props.url); | ||
} | ||
@@ -73,0 +73,0 @@ } |
{ | ||
"name": "react-share", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Social media share buttons and share counts for React.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -71,5 +71,5 @@ # react-share | ||
__Version 2.x.x__: comptiblity is tested with React 15 and 16. | ||
__Version 2.x.x__: compatiblity is tested with React 15 and 16. | ||
__Version 3.x.x__: comptiblity is tested with React 15 and 16. | ||
__Version 3.x.x__: compatiblity is tested with React 15 and 16. | ||
@@ -76,0 +76,0 @@ ## API |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
164335
3003