Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pure-render-decorator

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pure-render-decorator - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

.travis.yml

1

index.js

@@ -27,2 +27,3 @@ /**

component.prototype.shouldComponentUpdate = shouldComponentUpdate;
return component;
}

@@ -29,0 +30,0 @@

2

package.json
{
"name": "pure-render-decorator",
"version": "1.0.1",
"version": "1.1.0",
"description": "Makes React components pure.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -6,2 +6,4 @@ Pure render decorator

[![Build Status](https://travis-ci.org/felixgirault/pure-render-decorator.svg?branch=master)](https://travis-ci.org/felixgirault/pure-render-decorator)
Installation

@@ -22,5 +24,5 @@ ------------

@pureRender
class Test extends Component {
export default class Test extends Component {
render() {
return <div></div>;
return <div />;
}

@@ -46,1 +48,16 @@ }

```
As decorators are simply functions, you can also use `pureRender()` without the decorator syntax:
```jsx
import {Component} from 'react';
import pureRender from 'pure-render-decorator';
class Test extends Component {
render() {
return <div />;
}
}
export default pureRender(Test);
```

@@ -47,2 +47,10 @@ /**

});
/**
*
*/
it('should return the component', function() {
var c = function() {};
assert.equal(c, decorate(c));
});
});
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