Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call initial video on scroll outside of constructor call #1342

Merged
merged 4 commits into from
Feb 2, 2025

Conversation

IzaacAyelin
Copy link
Collaborator

@IzaacAyelin IzaacAyelin commented Jan 29, 2025

  • Call videoScrollHelper.updateGalleryStructure outside of propsTostate since it set state in a constructor
  • prevent set state on unmounted components (VideoItemWrapper and VideoItem)

@@ -131,6 +131,22 @@ export class GalleryContainer extends React.Component {
}

componentDidMount() {
const scrollHelperNewGalleryStructure = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's extract this to another function

@IzaacAyelin IzaacAyelin merged commit 788f9e0 into V4_Final Feb 2, 2025
7 checks passed
@IzaacAyelin IzaacAyelin deleted the defered-onscroll-test branch February 2, 2025 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants