in js/common/F8ScrollingHeader.js [59:74]
componentWillReceiveProps(nextProps) {
if (nextProps.scrollTop !== this.props.scrollTop) {
let toValue = null;
const { revealed } = this.state;
const { trigger, scrollTop, duration } = nextProps;
if (!revealed && scrollTop >= trigger) {
toValue = 1;
} else if (revealed && scrollTop < trigger) {
toValue = 0;
}
if (toValue !== null) {
this.setState({ revealed: toValue === 1 ? true : false });
Animated.timing(this.state.anim, { toValue, duration }).start();
}
}
}