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

Add rule S6756 (no-access-state-in-setstate): \"setState\" should use a callback when referencing the previous state #4154

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

yassin-kammoun-sonarsource
Copy link
Contributor

Fixes #4132

…se a callback when referencing the previous state
@yassin-kammoun-sonarsource yassin-kammoun-sonarsource changed the title Add rule S6756 (no-access-state-in-setstate): React state updates should not depend on stale states Add rule S6756 (no-access-state-in-setstate): \"setState\" should use a callback when referencing the previous state Sep 11, 2023
@sonarqube-next
Copy link

@yassin-kammoun-sonarsource yassin-kammoun-sonarsource merged commit 8644f60 into master Sep 12, 2023
16 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.

Create rule for react/no-access-state-in-setstate:
2 participants