Placeholder not re-rendering with window size change

This issue has been tracked since 2020-12-22.

I'm observing that my placeholder component is not re-rendering when the window size is changed, even when resize={true} is set.

I think its because of this line?

shouldComponentUpdate() {
  return this.visible;
}
Reykugo-Gear wrote this answer on 2021-08-11

there are an issue about that?

jack-matthews-axomic wrote this answer on 2021-09-10

I also needed the placeholder to re-render however, as @jackread said, re-rendering of placeholders is blocked by that snippet.

In my case I needed the placeholders to re-render with new heights as the height of the lazy loaded components had changed.

My workaround was to add a key prop to the LazyLoad component which will force a re-render of the component and it's placeholder when the height changes.

More Details About Repo
Owner Name twobin
Repo Name react-lazyload
Full Name twobin/react-lazyload
Language JavaScript
Created Date 2015-08-07
Updated Date 2022-11-29
Star Count 5639
Watcher Count 52
Fork Count 482
Issue Count 153

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date