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

Missing dependency in useEffect hook. #868

Open
sprucely opened this issue Jun 5, 2023 · 0 comments
Open

Missing dependency in useEffect hook. #868

sprucely opened this issue Jun 5, 2023 · 0 comments
Assignees

Comments

@sprucely
Copy link
Contributor

sprucely commented Jun 5, 2023

Including setNotification in effect's dependency list causes endless loop. Maybe the notification hook needs to wrap the returned callback in useCallback?

https://github.com/ucdavis/Harvest/blob/11853a91a563729faecb3e5105bdc16839b175f4/Harvest.Web/ClientApp/src/Projects/ProjectDetailContainer.tsx#L40C7-L64

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

No branches or pull requests

2 participants