(
'isExpanded',
'setExpanded',
() => false
)(component);
}
const ExpandableCmp = expandableFactory(Cmp);
// ;
// Property 'nProp' is missing in type ...
// Property 'sProp' is missing in type ...
;
const ExpandableSFC = expandableFactory(StatelessCmp);
//
// Property 'bar' is missing in type ...
;
t.end();
});
test('shouldUpdate', t => {
t.equal(typeof recompose.withState, 'function', 'shouldUpdate is a function');
interface Props {
stale: boolean;
}
const StaleOrFresh = (props: Props) => { props.stale ? 'Stale!' : 'Fresh!' }
;
const UpdateWhenStale = recompose.shouldUpdate((props: Props) => props.stale)(StaleOrFresh);
;
t.end();
});