Skip to content

Commit

Permalink
Use code blocks in docs for code references
Browse files Browse the repository at this point in the history
  • Loading branch information
jaaberg committed Aug 23, 2017
1 parent 70fa3c8 commit 919fc6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/rules/no-access-state-in-setstate.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Prevent using this.state within a this.setState (no-access-state-in-setstate)

This rule should prevent usage of this.state inside setState calls.
This rule should prevent usage of `this.state` inside setState calls.
Such usage of this.state might result in errors when two state calls is
called in batch and thus referencing old state and not the current
state. An example can be an increment function:
Expand All @@ -11,7 +11,7 @@ function increment() {
}
```

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
look be something like the following, given that value is 1:

```
Expand Down

0 comments on commit 919fc6c

Please sign in to comment.