question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

2.6.6 release not compatible with `unmountIfInvisible` prop

See original GitHub issue

We are using react-lazyload to only mount a resource-heavy component only when it’s visible. The unmountIfInvisible option is ideal for that and previously worked perfectly.

As of the latest release this has broken. It will now intermittently mount and unmount while scrolling.

CodeSandbox demo of issue

While I’m not overly familiar with your codebase, it seems the ref will always point to the one for the placeholder. In 2.6.5, this would refer to either the placeholder or the loaded component depending on which is visible. I think it might be causing it to unmount early as the visibility check then returns false.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
twobincommented, Apr 1, 2020

@ameerthehacker Because the impact is relatively large, I rolled back the code to 2.6.7

1reaction
MattCrouchcommented, Apr 2, 2020

@ameerthehacker I’ve tried out the beta version and everything’s working great.

Thanks for sorting it out so quickly. Much appreciated!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Boot 2.6.6 available now
6 has been released and is now available from Maven Central. The Spring Framework version in this release includes a fix for CVE-2022-22965, ......
Read more >
react-lazyload - npm
Lazyload your components, images or anything where performance matters.. Latest version: 3.2.0, last published: 2 years ago.
Read more >
Spring boot 2.6.7 incompatibility with spring-cloud-context 3.1 ...
7] is not compatible with this Spring Cloud release train Action: Consider applying the following actions: - Change Spring Boot version to one ......
Read more >
Migrate spring boot app from 2.4.4 to 2.6.6 we are getting ...
We migrate our application spring boot-2.4.4 to 2.6.6 and below Denodo ... candidates were found but could not be injected: - User-defined ...
Read more >
The Spring Boot Starter Parent | Baeldung
We just need to re-declare the property with a new value. For example, to change the Java version, we can indicate it in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found