Skip to content

Commit 8251eab

Browse files
authored
lifecycle -> lifecycle method (#3650)
1 parent 420c397 commit 8251eab

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
@@ -299,7 +299,7 @@ Note that this method is fired on *every* render, regardless of the cause. This
299299
getSnapshotBeforeUpdate(prevProps, prevState)
300300
```
301301

302-
`getSnapshotBeforeUpdate()` is invoked right before the most recently rendered output is committed to e.g. the DOM. It enables your component to capture some information from the DOM (e.g. scroll position) before it is potentially changed. Any value returned by this lifecycle will be passed as a parameter to `componentDidUpdate()`.
302+
`getSnapshotBeforeUpdate()` is invoked right before the most recently rendered output is committed to e.g. the DOM. It enables your component to capture some information from the DOM (e.g. scroll position) before it is potentially changed. Any value returned by this lifecycle method will be passed as a parameter to `componentDidUpdate()`.
303303

304304
This use case is not common, but it may occur in UIs like a chat thread that need to handle scroll position in a special way.
305305

0 commit comments

Comments
 (0)