Skip to content

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

Merged
amcgee merged 4 commits into
masterfrom
chore-formatting-errors
Oct 4, 2022
Merged

chore: fix cli-style useEffect exhaustive deps warnings#753
amcgee merged 4 commits into
masterfrom
chore-formatting-errors

Conversation

@amcgee

@amcgee amcgee commented Oct 3, 2022

Copy link
Copy Markdown
Contributor

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
Comment thread adapter/src/components/Alerts.js Outdated
if (alertManagerAlerts.length > 0 || alertStackAlerts.length > 0) {
setAlertStackAlerts(
if (alertManagerAlerts.length > 0) {
setAlertStackAlerts((alertStackAlerts) =>

Copy link
Copy Markdown
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
Copy Markdown
Contributor 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 👍

Comment thread adapter/src/components/Alerts.js Outdated
@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
Copy Markdown
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants