Socket
Socket
Sign inDemoInstall

react-share

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-share - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

5

CHANGELOG.md
# 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 @@

5

es/utils/createShareButton.js

@@ -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;

8

es/utils/shareCountFactory.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc