Skip to content

Commit

Permalink
Rename createSyncRoot to createSyncRoot
Browse files Browse the repository at this point in the history
- **createSyncRoot** was renamed to **createSyncRoot** in [#17165](facebook/react#17165)
- **unstable_** is not necessary in experimental releases. See [#17146](facebook/react#17146) and [#17108](facebook/react#17108)
  • Loading branch information
ecreeth authored Oct 24, 2019
1 parent ba6397a commit 36edb59
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apis/roots.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ These are concurrent-ready attachment points for React onto the DOM.

## `ReactDOM.createRoot and Root.render`

API: `ReactDOM.unstable_createRoot`
API: `ReactDOM.createRoot`

Instead of `ReactDOM.render`, `ReactDOM.createRoot` creates a Concurrent root for React. It also doesn't assume the first render is synchronous (aka you can suspend even on the first render, which useful for prerendering via `root.createBatch()`).

Expand All @@ -21,16 +21,16 @@ const root = ReactDOM.createRoot(container);
root.render(<App />);
```

## `ReactDOM.createSyncRoot`
## `ReactDOM.createBlockingRoot`

API: `ReactDOM.unstable_createSyncRoot`
API: `ReactDOM.createBlockingRoot

Create a Batched Mode root. It does not support `createBatch`.


```js
const container = document.getElementById('root');
const root = ReactDOM.createSyncRoot(container);
const root = ReactDOM.createBlockingRoot(container);
root.render(<App />);
```

Expand Down

0 comments on commit 36edb59

Please sign in to comment.