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

Put listen handler in useEffect #1445

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

giraffekey
Copy link
Contributor

Places "update-all-pipes" listener in a useEffect, which prevents the issue of it being run more than once and creating multiple callbacks.

Copy link

vercel bot commented Feb 21, 2025

@giraffekey is attempting to deploy a commit to the louis030195's projects Team on Vercel.

A member of the Team first needs to authorize it.

return () => {
unlisten.then((fn) => fn());
};
}, [pipes, setPipes, setInstalledPipes, setLoadingInstalls, settings.user]);

useEffect(() => {
const unsubscribePromise = listen("update-all-pipes", async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

its alrady in useeffect

@louis030195 louis030195 marked this pull request as draft February 21, 2025 19:04
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