Closed adesurirey closed 6 years ago
changing line 101 from :
getInitialState: function () {
return {
isVisible: null,
visibilityRect: {}
};
},
to:
getInitialState: function () {
return {
isVisible: false,
visibilityRect: {}
};
},
solved my issue. Could we make it an option ? Like by passing an initialVisibility
bool prop ?
Great work on this package, thanks a lot.
I have several (like hundreds) visibility sensors in the same view which leads to several performances issues because of the
onChange()
event that gets fired for all sensors when mounted.Is there a way to :
onChange
only if visible ?This initial check also happens on every
active
props change.I've tried a lot of things with no luck :/