Browse Source

Removed createBlockingRoot API docs and added a warning note (#3642)

main
Brian Vaughn 4 years ago
committed by GitHub
parent
commit
8e0ed8f899
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      content/docs/concurrent-mode-adoption.md
  2. 13
      content/docs/concurrent-mode-reference.md

4
content/docs/concurrent-mode-adoption.md

@ -21,6 +21,10 @@ next: concurrent-mode-reference.html
> >
>This documentation is aimed at early adopters and people who are curious. **If you're new to React, don't worry about these features** -- you don't need to learn them right now. >This documentation is aimed at early adopters and people who are curious. **If you're new to React, don't worry about these features** -- you don't need to learn them right now.
>Caution:
>
>All references below to "blocking mode" and `createBlockingRoot` are outdated and should be ignored.
</div> </div>
- [Installation](#installation) - [Installation](#installation)

13
content/docs/concurrent-mode-reference.md

@ -28,7 +28,6 @@ This page is an API reference for the React [Concurrent Mode](/docs/concurrent-m
- [Enabling Concurrent Mode](#concurrent-mode) - [Enabling Concurrent Mode](#concurrent-mode)
- [`createRoot`](#createroot) - [`createRoot`](#createroot)
- [`createBlockingRoot`](#createblockingroot)
- [Suspense](#suspense) - [Suspense](#suspense)
- [`Suspense`](#suspensecomponent) - [`Suspense`](#suspensecomponent)
- [`SuspenseList`](#suspenselist) - [`SuspenseList`](#suspenselist)
@ -47,18 +46,6 @@ Replaces `ReactDOM.render(<App />, rootNode)` and enables Concurrent Mode.
For more information on Concurrent Mode, check out the [Concurrent Mode documentation.](/docs/concurrent-mode-intro.html) For more information on Concurrent Mode, check out the [Concurrent Mode documentation.](/docs/concurrent-mode-intro.html)
### `createBlockingRoot` {#createblockingroot}
```js
ReactDOM.createBlockingRoot(rootNode).render(<App />)
```
Replaces `ReactDOM.render(<App />, rootNode)` and enables [Blocking Mode](/docs/concurrent-mode-adoption.html#migration-step-blocking-mode).
Opting into Concurrent Mode introduces semantic changes to how React works. This means that you can't use Concurrent Mode in just a few components. Because of this, some apps may not be able to migrate directly to Concurrent Mode.
Blocking Mode only contains a small subset of Concurrent Mode features and is intended as an intermediary migration step for apps that are unable to migrate directly.
## Suspense API {#suspense} ## Suspense API {#suspense}
### `Suspense` {#suspensecomponent} ### `Suspense` {#suspensecomponent}

Loading…
Cancel
Save