Skip to content

fixes #220 added empty depedency in useEffect - #227

Merged
gbowne1 merged 1 commit into
gbowne1:masterfrom
love-sonkar:infinite-fetching
Oct 12, 2024
Merged

fixes #220 added empty depedency in useEffect#227
gbowne1 merged 1 commit into
gbowne1:masterfrom
love-sonkar:infinite-fetching

Conversation

@love-sonkar

Copy link
Copy Markdown
Contributor

fixedd #220

i have added an empty depedency array in useEffect to stop infinite loop fetching issue.

Screenshot 2024-10-06 205940

@gbowne1

gbowne1 commented Oct 6, 2024

Copy link
Copy Markdown
Owner

We have tried to fix this issue before @love-sonkar.

@gbowne1 gbowne1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This PR fixes the infinite fetching loop by adding a empty dependency array

We have tried fixing this issue before.

Library.jsx is a huge file and really needs broken down into other things.

Approving this PR for merge

Thanks for the opportunity to review your PR and for your contribution

@gbowne1 gbowne1 added bug Something isn't working frontend Work on Frontend performance This is an issue related to the application performance usability This is related to UX or usability code-review This is ready for code review needs-review This issue, discussion or PR needs review labels Oct 6, 2024
@gbowne1 gbowne1 added this to the Frontend milestone Oct 6, 2024

@LOGESH-B LOGESH-B left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Adding empty array prevents the infinite call of the fetchBooksFromDB()

@BlackBond06 BlackBond06 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Changes in this PR works as expected, without any bugs. This effectively stops the continuing rendering of fetched books.

@gbowne1
gbowne1 merged commit 7500dc4 into gbowne1:master Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working code-review This is ready for code review frontend Work on Frontend needs-review This issue, discussion or PR needs review performance This is an issue related to the application performance usability This is related to UX or usability

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Title: Infinite Fetching Loop and Memory Leak in fetchBooksFromDB Function [Bug] Library.jsx useEffect has missing dependency

4 participants