Socket
Socket
Sign inDemoInstall

react-responsive

Package Overview
Dependencies
9
Maintainers
2
Versions
70
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.10 to 1.3.0

12

CHANGELOG.md
## Change Log
### upcoming (2017/04/19 18:32 +00:00)
### upcoming (2017/05/09 01:13 +00:00)
- [#97](https://github.com/contra/react-responsive/pull/97) Add onChange and onChangeBefore callbacks (@hiddenboox)
- [6cb52b1](https://github.com/contra/react-responsive/commit/6cb52b15a452f1189bd4f89a4c5ce41bee21fe02) Add onBeforeChange callback (@hiddenboox)
- [#96](https://github.com/contra/react-responsive/pull/96) Adding demo link to readme (@scottwarren)
- [5836dfe](https://github.com/contra/react-responsive/commit/5836dfee1e85675ba1ea796a0e3cc75bba77d580) Adding link to readme (@scottwarren)
- [2c6b00d](https://github.com/contra/react-responsive/commit/2c6b00da63091b3bada0b8fe6105e50e29b37fde) Add onChange callback (@d4rky-pl)
### v1.2.10 (2017/04/19 18:32 +00:00)
- [ab7ff5c](https://github.com/contra/react-responsive/commit/ab7ff5cddcba1f22f3ace26dd777bbc530449c6c) 1.2.10 (@contra)
- [4f8f916](https://github.com/contra/react-responsive/commit/4f8f91612d389b06cfed42723b3fe0b8e1a66f8c) build (@contra)

@@ -152,4 +160,4 @@

- [7d05ab6](https://github.com/contra/react-responsive/commit/7d05ab60e7feb53d118ea94f92e5103bdae08627) change names to MediaQuery and add `all` type (@phated)
- [6c6054a](https://github.com/contra/react-responsive/commit/6c6054a48df4620c301f31ffe6e456f0a2000142) update readme (@phated)
- [39ab71d](https://github.com/contra/react-responsive/commit/39ab71d2f60a238ae3ac78bc485f804f2e2fc07e) add type property (@phated)
- [6c6054a](https://github.com/contra/react-responsive/commit/6c6054a48df4620c301f31ffe6e456f0a2000142) update readme (@phated)
- [48e6c5d](https://github.com/contra/react-responsive/commit/48e6c5d6c3b8360603f2aeabb599b3c601cb74b9) update reactify, add example, use React.PropTypes.shape to define values (@phated)

@@ -156,0 +164,0 @@ - [759154b](https://github.com/contra/react-responsive/commit/759154bfb098aed3be707086d0448ec39cc42ffe) switch to matchmedia module for client/server abstraction (@phated)

@@ -103,3 +103,5 @@ (function webpackUniversalModuleDefinition(root, factory) {

values: _propTypes2.default.shape(_mediaQuery2.default.matchers),
children: _propTypes2.default.oneOfType([_propTypes2.default.node, _propTypes2.default.function])
children: _propTypes2.default.oneOfType([_propTypes2.default.node, _propTypes2.default.function]),
onChange: _propTypes2.default.function,
onBeforeChange: _propTypes2.default.function
};

@@ -182,2 +184,16 @@ var mediaKeys = Object.keys(_mediaQuery2.default.all);

}, {
key: 'componentWillUpdate',
value: function componentWillUpdate(_, nextState) {
if (this.props.onBeforeChange && this.state.matches !== nextState.matches) {
this.props.onBeforeChange(this.state.matches);
}
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate(_, prevState) {
if (this.props.onChange && prevState.matches !== this.state.matches) {
this.props.onChange(this.state.matches);
}
}
}, {
key: 'componentWillUnmount',

@@ -397,3 +413,7 @@ value: function componentWillUnmount() {

process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;
process.listeners = function (name) { return [] }
process.binding = function (name) {

@@ -400,0 +420,0 @@ throw new Error('process.binding is not supported');

2

package.json
{
"name": "react-responsive",
"description": "Media queries in react for responsive design",
"version": "1.2.10",
"version": "1.3.0",
"homepage": "http://github.com/contra/react-responsive",

@@ -6,0 +6,0 @@ "repository": {

@@ -18,2 +18,6 @@ # react-responsive [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Support us][gittip-image]][gittip-url]

</tr>
</tr>
<tr>
<td colspan="2"><a href="http://contra.io/react-responsive/">Demo</a></td>
</tr>
</table>

@@ -20,0 +24,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc