We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70fa3c8 commit 919fc6cCopy full SHA for 919fc6c
docs/rules/no-access-state-in-setstate.md
@@ -1,6 +1,6 @@
1
# Prevent using this.state within a this.setState (no-access-state-in-setstate)
2
3
-This rule should prevent usage of this.state inside setState calls.
+This rule should prevent usage of `this.state` inside setState calls.
4
Such usage of this.state might result in errors when two state calls is
5
called in batch and thus referencing old state and not the current
6
state. An example can be an increment function:
@@ -11,7 +11,7 @@ function increment() {
11
}
12
```
13
14
-If these two setState operations is grouped together in a batch it will
+If these two `setState` operations is grouped together in a batch it will
15
look be something like the following, given that value is 1:
16
17
0 commit comments