alt-resolver
Advanced tools
Comparing version 0.0.1 to 0.1.0
@@ -57,3 +57,3 @@ 'use strict'; | ||
this.state = this.resolveState(); | ||
this.state = this.resolveState(props); | ||
} | ||
@@ -64,3 +64,3 @@ | ||
value: function resolveState(nextProps) { | ||
var resolve = this.config.resolve ? toResolverProps(this.call(this.config.resolve), nextProps) : {}; | ||
var resolve = this.config.resolve ? toResolverProps(this.call(this.config.resolve, nextProps), nextProps) : {}; | ||
return { resolve: resolve }; | ||
@@ -71,6 +71,13 @@ } | ||
value: function componentWillReceiveProps(nextProps) { | ||
if (this.config.willReceiveProps) this.call(this.config.willReceiveProps); | ||
if (this.config.willReceiveProps) { | ||
this.call(this.config.willReceiveProps, nextProps); | ||
} | ||
this.setState(this.resolveState(nextProps)); | ||
} | ||
}, { | ||
key: 'storeDidChange', | ||
value: function storeDidChange() { | ||
this.setState(this.resolveState(this.props)); | ||
} | ||
}, { | ||
key: 'render', | ||
@@ -77,0 +84,0 @@ value: function render() { |
{ | ||
"name": "alt-resolver", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"description": "A connect to stores that works with react resolver", | ||
@@ -9,2 +9,3 @@ "main": "lib/resolver.js", | ||
"clean": "rimraf lib", | ||
"prepublish": "npm run build", | ||
"pretest": "npm run clean && npm run transpile", | ||
@@ -11,0 +12,0 @@ "test": "babel-node test/index.js", |
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
6985
99