refract-callbag
Advanced tools
Comparing version 4.2.2 to 4.2.3
@@ -189,2 +189,5 @@ import $$observable from 'symbol-observable'; | ||
} | ||
else if (typeof state === 'function') { | ||
instance.state = state(instance.state); | ||
} | ||
else { | ||
@@ -206,8 +209,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 | ||
}); | ||
} | ||
} | ||
@@ -214,0 +224,0 @@ else { |
22
index.js
@@ -195,2 +195,5 @@ 'use strict'; | ||
} | ||
else if (typeof state === 'function') { | ||
instance.state = state(instance.state); | ||
} | ||
else { | ||
@@ -212,8 +215,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 | ||
}); | ||
} | ||
} | ||
@@ -220,0 +230,0 @@ else { |
{ | ||
"name": "refract-callbag", | ||
"description": "Refract bindings for React with Callbag: 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
55779
1235