refract-xstream
Advanced tools
Comparing version 4.2.2 to 4.2.3
@@ -193,2 +193,5 @@ import $$observable from 'symbol-observable'; | ||
} | ||
else if (typeof state === 'function') { | ||
instance.state = state(instance.state); | ||
} | ||
else { | ||
@@ -210,8 +213,15 @@ instance.state = __assign({}, instance.state, state); | ||
else if (effect && effect.type === PROPS_EFFECT) { | ||
var payload = effect.payload; | ||
setState({ | ||
replace: payload.replace, | ||
props: mergeProps | ||
? __assign({}, instance.state.props, payload.props) : payload.props | ||
}); | ||
var payload_1 = effect.payload; | ||
if (mergeProps) { | ||
setState(function (prev) { return ({ | ||
replace: payload_1.replace, | ||
props: __assign({}, prev.props, payload_1.props) | ||
}); }); | ||
} | ||
else { | ||
setState({ | ||
replace: payload_1.replace, | ||
props: payload_1.props | ||
}); | ||
} | ||
} | ||
@@ -218,0 +228,0 @@ else { |
22
index.js
@@ -199,2 +199,5 @@ 'use strict'; | ||
} | ||
else if (typeof state === 'function') { | ||
instance.state = state(instance.state); | ||
} | ||
else { | ||
@@ -216,8 +219,15 @@ instance.state = __assign({}, instance.state, state); | ||
else if (effect && effect.type === PROPS_EFFECT) { | ||
var payload = effect.payload; | ||
setState({ | ||
replace: payload.replace, | ||
props: mergeProps | ||
? __assign({}, instance.state.props, payload.props) : payload.props | ||
}); | ||
var payload_1 = effect.payload; | ||
if (mergeProps) { | ||
setState(function (prev) { return ({ | ||
replace: payload_1.replace, | ||
props: __assign({}, prev.props, payload_1.props) | ||
}); }); | ||
} | ||
else { | ||
setState({ | ||
replace: payload_1.replace, | ||
props: payload_1.props | ||
}); | ||
} | ||
} | ||
@@ -224,0 +234,0 @@ else { |
{ | ||
"name": "refract-xstream", | ||
"description": "Refract bindings for React with xstream: harness the power of reactive programming to supercharge your components!", | ||
"version": "4.2.2", | ||
"version": "4.2.3", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "jsnext:main": "index.es.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
55150
1236