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

chore: fix cli-style useEffect exhaustive deps warnings #753

Merged
merged 4 commits into from
Oct 4, 2022

Conversation

amcgee
Copy link
Member

@amcgee amcgee commented Oct 3, 2022

Avoid cli-style warnings and clean up useEffect calls to make logic a bit cleaner

@amcgee amcgee requested a review from a team October 4, 2022 07:25
if (alertManagerAlerts.length > 0 || alertStackAlerts.length > 0) {
setAlertStackAlerts(
if (alertManagerAlerts.length > 0) {
setAlertStackAlerts((alertStackAlerts) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Very minor nitpick: This variable has the same name as the variable returned by useState in the outer scope. Maybe currentAlertStackAlert (or another name that ensures that the reader immediately recognizes that this is a different variable)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah that's a nice readability improvement 👍

@amcgee amcgee merged commit 47fc9ff into master Oct 4, 2022
@amcgee amcgee deleted the chore-formatting-errors branch October 4, 2022 23:32
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 10.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants