Skip to content

Conversation

@damianstasik
Copy link
Contributor

New Pull Request Checklist

Issue Description

This PR enables ESLint react/no-access-state-in-setstate rule that disallows access of this.state within setState calls. This can prevent nasty bugs caused by referencing old state, unfortunately while refactoring the code I spotted multiple direct this.state manipulations which should be also refactored as soon as possible to avoid unexpected behavior caused by for example concurrent rendering in React 18.

Related issue: #1950

Approach

TODOs before merging

  • Add tests
  • Add changes to documentation (guides, repository pages, in-code descriptions)
  • A changelog entry is created automatically using the pull request title (do not manually add a changelog entry)

@parse-github-assistant
Copy link

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

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.

1 participant