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

Refactor fetchNostrContacts #2065

Merged

Conversation

shubhamkmr04
Copy link
Contributor

@shubhamkmr04 shubhamkmr04 commented Mar 16, 2024

  • The code now uses Promise.all() to wait for all asynchronous operations to complete before proceeding ensuring proper execution flow.
  • Previously setState() was called inside the loop, which could result in multiple state updates and unnecessary re-renders. Now setState() is called only once after all asynchronous operations are completed, reducing unnecessary re-renders and improving performance.

@kaloudis kaloudis added this to the v0.8.3 milestone Mar 17, 2024
Copy link
Contributor

@kaloudis kaloudis left a comment

Choose a reason for hiding this comment

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

tACK

@kaloudis kaloudis merged commit 1c37cae into ZeusLN:master Mar 19, 2024
3 checks passed
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.

None yet

2 participants