@cerebral/react
Advanced tools
Comparing version 4.0.0-1528228926684 to 4.0.0-1528462505049
@@ -50,7 +50,8 @@ 'use strict'; | ||
}); | ||
_this.view.mount(); | ||
return _this; | ||
} | ||
/* | ||
Register the component to the dependency store with its | ||
state tracker and tags state dependencies | ||
We only allow forced render by change of props passed | ||
or Container tells it to render | ||
*/ | ||
@@ -60,15 +61,5 @@ | ||
_createClass(BaseComponent, [{ | ||
key: 'componentWillMount', | ||
value: function componentWillMount() { | ||
this.view.mount(); | ||
} | ||
/* | ||
We only allow forced render by change of props passed | ||
or Container tells it to render | ||
*/ | ||
}, { | ||
key: 'shouldComponentUpdate', | ||
value: function shouldComponentUpdate() { | ||
return false; | ||
value: function shouldComponentUpdate(nextProps) { | ||
return this.view.onPropsUpdate(this.props, nextProps); | ||
} | ||
@@ -98,16 +89,2 @@ /* | ||
/* | ||
If received props differ, we need to update any | ||
StateTrackers and tags, cause they might be using | ||
props to define a state dependency | ||
*/ | ||
}, { | ||
key: 'componentWillReceiveProps', | ||
value: function componentWillReceiveProps(nextProps) { | ||
var hasUpdate = this.view.onPropsUpdate(this.props, nextProps); | ||
if (hasUpdate) { | ||
this.forceUpdate(); | ||
} | ||
} | ||
/* | ||
Unregister with existing state dependencies | ||
@@ -114,0 +91,0 @@ */ |
{ | ||
"name": "@cerebral/react", | ||
"version": "4.0.0-1528228926684", | ||
"version": "4.0.0-1528462505049", | ||
"description": "React view for Cerebral", | ||
@@ -20,3 +20,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"cerebral": "^5.0.0-1528228926684" | ||
"cerebral": "^5.0.0-1528462505049" | ||
}, | ||
@@ -23,0 +23,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
23698
249