New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

recompose

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

recompose - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

14

lifecycle.js

@@ -33,5 +33,5 @@ 'use strict';

return (function (_React$Component) {
_inherits(Sink, _React$Component);
_inherits(Lifecycle, _React$Component);
_createClass(Sink, null, [{
_createClass(Lifecycle, null, [{
key: 'displayName',

@@ -42,10 +42,10 @@ value: (0, _wrapDisplayName2['default'])(BaseComponent, 'lifecycle'),

function Sink(props, context) {
_classCallCheck(this, Sink);
function Lifecycle(props, context) {
_classCallCheck(this, Lifecycle);
_get(Object.getPrototypeOf(Sink.prototype), 'constructor', this).call(this, props, context);
_get(Object.getPrototypeOf(Lifecycle.prototype), 'constructor', this).call(this, props, context);
setup(this);
}
_createClass(Sink, [{
_createClass(Lifecycle, [{
key: 'componentWillUnmount',

@@ -62,3 +62,3 @@ value: function componentWillUnmount() {

return Sink;
return Lifecycle;
})(_react2['default'].Component);

@@ -65,0 +65,0 @@ };

{
"name": "recompose",
"version": "0.2.2",
"version": "0.2.3",
"description": "A microcomponentization toolkit for React",

@@ -30,2 +30,5 @@ "main": "index.js",

},
"peerDependencies": {
"react": "^0.14.0"
},
"devDependencies": {

@@ -50,4 +53,4 @@ "babel": "^5.8.23",

"phantomjs": "^1.9.18",
"react": "^0.14.0-rc1",
"react-addons-test-utils": "^0.14.0-rc1",
"react": "^0.14.0",
"react-addons-test-utils": "^0.14.0",
"rimraf": "^2.4.3",

@@ -54,0 +57,0 @@ "sinon": "^1.17.1",

@@ -24,3 +24,3 @@ Recompose

<p>
Clicked: {counter} times
Count: {counter}
<button onClick={increment}>+</button>

@@ -33,5 +33,6 @@ <button onClick={decrement}>-</button>

withState('counter', 'setCounter', 0),
mapProps(({ setCounter }) => ({
mapProps(({ setCounter, ...rest }) => ({
increment: () => setCounter(n => n + 1),
decrement: () => setCounter(n => n - 1)
decrement: () => setCounter(n => n - 1),
...rest
}))

@@ -41,2 +42,4 @@ )(Counter);

More complex examples are coming soon. Here's a [mini React Redux clone](https://github.com/acdlite/recompose/blob/master/src/__tests__/withContext-test.js#L13) from the test suite.
Read on for more about the library, its goals, and how it works.

@@ -128,7 +131,5 @@

```js
@compose(
withState(...),
mapProps(...),
onWillReceiveProps(...)
)
@withState(...)
@mapProps(...)
@onWillReceiveProps(...)
class Component extends React.Component {...}

@@ -135,0 +136,0 @@ ```

@@ -9,6 +9,2 @@ 'use strict';

var _lodashFunctionCurry = require('lodash/function/curry');
var _lodashFunctionCurry2 = _interopRequireDefault(_lodashFunctionCurry);
var _getDisplayName = require('./getDisplayName');

@@ -22,3 +18,3 @@

exports['default'] = (0, _lodashFunctionCurry2['default'])(wrapDisplayName);
exports['default'] = wrapDisplayName;
module.exports = exports['default'];

Sorry, the diff of this file is not supported yet

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