Skip to content

Commit d917a2b

Browse files
docs(react-dom): clarify unstable_batchedUpdates
1 parent abe931a commit d917a2b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/content/reference/react-dom/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ The `react-dom` package provides two additional entry points:
4141

4242
---
4343

44+
## Legacy APIs {/*legacy-apis*/}
45+
46+
These APIs are exported for compatibility with legacy roots created with `ReactDOM.render` in React 18 and earlier. They are not recommended for newly written code.
47+
48+
* `unstable_batchedUpdates` lets you batch updates that happen outside React event handlers in legacy roots. In React 18+ with `createRoot`, React batches updates automatically, so `unstable_batchedUpdates` is a no-op.
49+
50+
---
51+
4452
## Removed APIs {/*removed-apis*/}
4553

4654
These APIs were removed in React 19:

0 commit comments

Comments
 (0)