Skip to content

MB-5390 - [CAT II] eslint-plugin-react no-access-state-in-setstate: Use callback in setState when referencing the previous state

Moderate
chtakahashi published GHSA-f589-vqjw-vr8p Nov 30, 2022

Package

No package listed

Affected versions

1.0

Patched versions

None

Description

Impact

Node.js allows developers to assign callbacks to IO-blocked events. This allows better performance as the callbacks run asynchronously such that the main application isn't blocked by IO. However, this in turn may lead to race conditions when something outside the callback relies upon code within the callback to be run first.

References

https://dp3.atlassian.net/browse/MB-5390

For more information

Severity

Moderate

CVE ID

No known CVE

Weaknesses

No CWEs