Skip to content

Commit

Permalink
Merge pull request vasanthk#100 from coryhouse/patch-1
Browse files Browse the repository at this point in the history
Grammar fixes
  • Loading branch information
vasanthk authored Mar 7, 2018
2 parents 3c5a6c8 + 766efe0 commit d0057c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions patterns/19.async-nature-of-setState.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ And that render was called immediately after triggering the setState method. But
Well, it turns out React does not understand and thus cannot control code that doesn't live inside the library.
Timeouts or AJAX calls for example, are developer authored code that executes outside of the context of React.

So why does React synchronously updated the state in these cases? Well, because it's trying to be as defensive as possible.
Not being in control means it's not able to do any perf optimisations so it's better to update the state on spot and
So why does React synchronously update the state in these cases? Well, because it's trying to be as defensive as possible.
Not being in control means it's not able to do any performance optimisations so it's better to update the state on spot and
make sure the code that follows has access to the latest information available.

```javascript
Expand Down

0 comments on commit d0057c9

Please sign in to comment.