Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function updateObs(prevObs, nextProps, plain) {
var nextObs = {};
for (var k in nextProps) {
var v = nextProps[k];
if (plain(k)) {
nextObs[k] = v;
} else {
var obs = nextObs[k] = prevObs[k] || new K.Property().skipDuplicates(I.identicalU);
obs._emitValue(v);
}
}
for (var _k2 in prevObs) {
if (!plain(_k2)) {
var _v = prevObs[_k2];
if (_v !== nextObs[_k2]) {
_v._emitEnd();
}
}
}
return nextObs;
}
function updateObs(prevObs, nextProps, plain) {
var nextObs = {};
for (var k in nextProps) {
var v = nextProps[k];
if (plain(k)) {
nextObs[k] = v;
} else {
var obs = nextObs[k] = prevObs[k] || new Property().skipDuplicates(identicalU);
obs._emitValue(v);
}
}
for (var _k2 in prevObs) {
if (!plain(_k2)) {
var _v = prevObs[_k2];
if (_v !== nextObs[_k2]) {
_v._emitEnd();
}
}
}
return nextObs;
}
function updateObs(prevObs, nextProps, plain) {
const nextObs = {}
for (const k in nextProps) {
const v = nextProps[k]
if (plain(k)) {
nextObs[k] = v
} else {
const obs = (nextObs[k] =
prevObs[k] || new K.Property().skipDuplicates(I.identicalU))
obs._emitValue(v)
}
}
for (const k in prevObs) {
if (!plain(k)) {
const v = prevObs[k]
if (v !== nextObs[k]) {
v._emitEnd()
}
}
}
return nextObs
}
) => (
WrappedComponent: React.RefForwardingComponent | React.ElementType<p>
) =>
class WithRef$ extends React.Component</p><p> {
static displayName =
typeof WrappedComponent !== 'string'
? wrapDisplayName(WrappedComponent, 'WithRef$')
: `WithRef(${WrappedComponent})`;
static Target: any = wrap(WrappedComponent);
props$ = new Kefir.Stream()
.toProperty(() => this.props)
.setName(`${WithRef$.displayName}#props$`);
ref$ = new Kefir.Property().setName(
`${WithRef$.displayName}#ref$`
);
aggregated$?: Pool;
plugged$?: Observable;
refback = (el: E | null) => el && (this.ref$ as any)._emitValue(el);
componentWillUnmount() {
this.aggregated$ &&
this.plugged$ &&
this.aggregated$.unplug(this.plugged$);
}
componentDidMount() {</p>