Skip to content

Commit d5ebad1

Browse files
authored
Wordsmithing nit
1 parent e97ad4f commit d5ebad1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/reference-react-component.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ componentWillUpdate(nextProps, nextState)
216216

217217
`componentWillUpdate()` is invoked immediately before rendering when new props or state are being received. Use this as an opportunity to perform preparation before an update occurs. This method is not called for the initial render.
218218

219-
Note that you cannot call `this.setState()` here; nor should you do anything else (for example, dispatching redux actions) that would trigger an update to any React component before `componentWillUpdate` returns. If you need to update state in response to a prop change, use `componentWillReceiveProps()` instead.
219+
Note that you cannot call `this.setState()` here; nor should you do anything else (eg dispatch a redux action) that would trigger an update to a React component before `componentWillUpdate` returns. Use `componentWillReceiveProps()` if you need to update `state` in response to `props` changes.
220220

221221
> Note
222222
>

0 commit comments

Comments
 (0)