Skip to content

Commit 4caa055

Browse files
committed
Add getDerivedStateFromProps documentation for createClass
Closes #1214
1 parent 2da4f7f commit 4caa055

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/content/reference/react/Component.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,12 @@ Implementing `static getDerivedStateFromProps` in a class component is equivalen
10191019
10201020
</Note>
10211021
1022+
<Note>
1023+
1024+
**Note:** The `static getDerivedStateFromProps` method can also be used with components created via the `createClass` API (using the [`create-react-class`](https://www.npmjs.com/package/create-react-class) package). This allows legacy codebases to adopt the newer lifecycle pattern.
1025+
1026+
</Note>
1027+
10221028
---
10231029
10241030
## Usage {/*usage*/}

0 commit comments

Comments
 (0)