On build there is error on this page stating TypeError : Children is not a function react-visibility-sensor
class VisibilitySensor extends Component {
constructor(props) {
super(props);
this.state = {
active: true
};
}
render() {
const { active } = this.state;
const { once, children, ...theRest } = this.props;
return (
<VSensor
active={active}
onChange={isVisible =>
once &&
isVisible &&
this.setState({ active: false })
}
{...theRest}
>
{({ isVisible }) => children({ isVisible })}
</VSensor>
);
}
}