react-reactive-class
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -51,2 +51,7 @@ 'use strict'; | ||
}, { | ||
key: 'shouldComponentUpdate', | ||
value: function shouldComponentUpdate(nextProps, nextState) { | ||
return nextState !== this.state; | ||
} | ||
}, { | ||
key: 'componentWillUnmount', | ||
@@ -53,0 +58,0 @@ value: function componentWillUnmount() { |
{ | ||
"name": "react-reactive-class", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "create reactive react classes", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -51,3 +51,3 @@ # React Reactive Class | ||
// notice that App will not re-render, nice! | ||
window.props$.onNext({color: 'blue'}); | ||
window.style$.onNext({color: 'blue'}); | ||
window.text$.onNext('Reactive!'); | ||
@@ -61,2 +61,4 @@ // you can open your console and play around | ||
```javascript | ||
import {reactive} from 'react-reactive-class'; | ||
class Text extends React.Component { | ||
@@ -77,2 +79,4 @@ render() { | ||
```javascript | ||
import {reactive} from 'react-reactive-class'; | ||
@reactive | ||
@@ -93,3 +97,3 @@ class XText extends React.Component { | ||
```javascript | ||
// If text's length is 0, unmount this component | ||
// Unmount this component if length of incoming text is 0. | ||
<Span mount={ text$.map(text => text.length) }> | ||
@@ -96,0 +100,0 @@ {text$} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
803789
17548
119