You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In practice, I'm also noticing that components who's render return value ends up as null are being tracked as entering the viewport, but this seems counterintuitive.
contrived example:
constConditionalComponent=(props)=>{returnprops.shouldRender ? <div>Yay!</div> : null;};consti13nConditionalComponent=createI13nNode(ConditionalComponent);// triggers viewport as intended when in view<ConditionalComponentshouldRender/>// still triggers viewport as maybe(?) unintended on init<ConditionalComponentshouldRender={false}/>
The text was updated successfully, but these errors were encountered:
Certainly possible I'm misinterpreting the code, but it appears as if
_onEnterViewport
is purposefully triggered if/when the tracked element does not exist. See https://github.com/yahoo/react-i13n/blob/master/src/libs/ViewportDetector.js#L56In practice, I'm also noticing that components who's render return value ends up as
null
are being tracked as entering the viewport, but this seems counterintuitive.contrived example:
The text was updated successfully, but these errors were encountered: