Browse Source

Simplify wording

main
Dan Abramov 2 years ago
parent
commit
5ef6955a90
  1. 5
      content/docs/components-and-props.md
  2. 4
      content/docs/conditional-rendering.md
  3. 4
      content/docs/context.md
  4. 4
      content/docs/forms.md
  5. 4
      content/docs/forwarding-refs.md
  6. 4
      content/docs/getting-started.md
  7. 4
      content/docs/handling-events.md
  8. 4
      content/docs/hooks-custom.md
  9. 4
      content/docs/hooks-effect.md
  10. 30
      content/docs/hooks-reference.md
  11. 4
      content/docs/hooks-state.md
  12. 4
      content/docs/introducing-jsx.md
  13. 4
      content/docs/lifting-state-up.md
  14. 4
      content/docs/lists-and-keys.md
  15. 4
      content/docs/portals.md
  16. 4
      content/docs/reconciliation.md
  17. 4
      content/docs/reference-dom-elements.md
  18. 4
      content/docs/reference-events.md
  19. 2
      content/docs/reference-react-component.md
  20. 4
      content/docs/reference-react-dom-client.md
  21. 12
      content/docs/reference-react-dom-server.md
  22. 12
      content/docs/reference-react-dom.md
  23. 28
      content/docs/reference-react.md
  24. 4
      content/docs/refs-and-the-dom.md
  25. 4
      content/docs/state-and-lifecycle.md
  26. 4
      content/docs/strict-mode.md
  27. 8
      content/docs/thinking-in-react.md
  28. 4
      content/docs/uncontrolled-components.md
  29. 8
      content/tutorial/tutorial.md

5
content/docs/components-and-props.md

@ -16,15 +16,14 @@ prev: rendering-elements.html
next: state-and-lifecycle.html
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
> - [Quick Start](https://beta.reactjs.org/learn)
> - [Your First Component](https://beta.reactjs.org/learn/your-first-component)
> - [Passing Props to a Component](https://beta.reactjs.org/learn/passing-props-to-a-component)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
Components let you split the UI into independent, reusable pieces, and think about each piece in isolation. This page provides an introduction to the idea of components. You can find a [detailed component API reference here](/docs/react-component.html).

4
content/docs/conditional-rendering.md

@ -8,13 +8,13 @@ redirect_from:
- "tips/false-in-jsx.html"
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
> - [Conditional Rendering](https://beta.reactjs.org/learn/conditional-rendering)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
In React, you can create distinct components that encapsulate behavior you need. Then, you can render only some of them, depending on the state of your application.

4
content/docs/context.md

@ -4,14 +4,14 @@ title: Context
permalink: docs/context.html
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
> - [Passing Data Deeply with Context](https://beta.reactjs.org/learn/passing-data-deeply-with-context)
> - [`useContext`](https://beta.reactjs.org/reference/react/useContext)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
Context provides a way to pass data through the component tree without having to pass props down manually at every level.

4
content/docs/forms.md

@ -9,7 +9,7 @@ redirect_from:
- "docs/forms-zh-CN.html"
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
@ -17,7 +17,7 @@ redirect_from:
> - [`<select>`](https://beta.reactjs.org/reference/react-dom/components/select)
> - [`<textarea>`](https://beta.reactjs.org/reference/react-dom/components/textarea)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
HTML form elements work a bit differently from other DOM elements in React, because form elements naturally keep some internal state. For example, this form in plain HTML accepts a single name:

4
content/docs/forwarding-refs.md

@ -4,14 +4,14 @@ title: Forwarding Refs
permalink: docs/forwarding-refs.html
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
> - [Manipulating the DOM with Refs](https://beta.reactjs.org/learn/manipulating-the-dom-with-refs)
> - [`forwardRef`](https://beta.reactjs.org/reference/react/forwardRef)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
Ref forwarding is a technique for automatically passing a [ref](/docs/refs-and-the-dom.html) through a component to one of its children. This is typically not necessary for most components in the application. However, it can be useful for some kinds of components, especially in reusable component libraries. The most common scenarios are described below.

4
content/docs/getting-started.md

@ -20,9 +20,9 @@ redirect_from:
> Try the new React documentation.
>
> The new [Quick Start](https://beta.reactjs.org/learn) teaches modern React and include live examples.
> The new [Quick Start](https://beta.reactjs.org/learn) teaches modern React and includes live examples.
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
This page is an overview of the React documentation and related resources.

4
content/docs/handling-events.md

@ -8,13 +8,13 @@ redirect_from:
- "docs/events-ko-KR.html"
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
> - [Responding to Events](https://beta.reactjs.org/learn/responding-to-events)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
Handling events with React elements is very similar to handling events on DOM elements. There are some syntax differences:

4
content/docs/hooks-custom.md

@ -6,13 +6,13 @@ next: hooks-reference.html
prev: hooks-rules.html
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
> - [Reusing Logic with Custom Hooks](https://beta.reactjs.org/learn/reusing-logic-with-custom-hooks)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
*Hooks* are a new addition in React 16.8. They let you use state and other React features without writing a class.

4
content/docs/hooks-effect.md

@ -6,7 +6,7 @@ next: hooks-rules.html
prev: hooks-state.html
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
@ -14,7 +14,7 @@ prev: hooks-state.html
> - [You Might Not Need an Effect](https://beta.reactjs.org/learn/you-might-not-need-an-effect)
> - [`useEffect`](https://beta.reactjs.org/reference/react/useEffect)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
*Hooks* are a new addition in React 16.8. They let you use state and other React features without writing a class.

30
content/docs/hooks-reference.md

@ -37,7 +37,7 @@ If you're new to Hooks, you might want to check out [the overview](/docs/hooks-o
> Try the new React documentation for [`useState`](https://beta.reactjs.org/reference/react/useState).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```js
const [state, setState] = useState(initialState);
@ -124,7 +124,7 @@ In the rare case that you need to force the DOM update to be applied synchronous
> Try the new React documentation for [`useEffect`](https://beta.reactjs.org/reference/react/useEffect).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```js
useEffect(didUpdate);
@ -207,7 +207,7 @@ The array of dependencies is not passed as arguments to the effect function. Con
> Try the new React documentation for [`useContext`](https://beta.reactjs.org/reference/react/useContext).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```js
@ -284,7 +284,7 @@ The following Hooks are either variants of the basic ones from the previous sect
> Try the new React documentation for [`useReducer`](https://beta.reactjs.org/reference/react/useReducer).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```js
@ -392,7 +392,7 @@ Note that React may still need to render that specific component again before ba
> Try the new React documentation for [`useCallback`](https://beta.reactjs.org/reference/react/useCallback).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```js
const memoizedCallback = useCallback(
@ -419,7 +419,7 @@ Pass an inline callback and an array of dependencies. `useCallback` will return
> Try the new React documentation for [`useMemo`](https://beta.reactjs.org/reference/react/useMemo).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```js
@ -446,7 +446,7 @@ If no array is provided, a new value will be computed on every render.
> Try the new React documentation for [`useRef`](https://beta.reactjs.org/reference/react/useRef).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```js
@ -488,7 +488,7 @@ Keep in mind that `useRef` *doesn't* notify you when its content changes. Mutati
> Try the new React documentation for [`useImperativeHandle`](https://beta.reactjs.org/reference/react/useImperativeHandle).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```js
@ -516,7 +516,7 @@ In this example, a parent component that renders `<FancyInput ref={inputRef} />`
> Try the new React documentation for [`useLayoutEffect`](https://beta.reactjs.org/reference/react/useLayoutEffect).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
The signature is identical to `useEffect`, but it fires synchronously after all DOM mutations. Use this to read layout from the DOM and synchronously re-render. Updates scheduled inside `useLayoutEffect` will be flushed synchronously, before the browser has a chance to paint.
@ -535,7 +535,7 @@ Prefer the standard `useEffect` when possible to avoid blocking visual updates.
> Try the new React documentation for [`useDebugValue`](https://beta.reactjs.org/reference/react/useDebugValue).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```js
@ -580,7 +580,7 @@ useDebugValue(date, date => date.toDateString());
> Try the new React documentation for [`useDeferredValue`](https://beta.reactjs.org/reference/react/useDeferredValue).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```js
@ -623,7 +623,7 @@ Memoizing the children tells React that it only needs to re-render them when `de
> Try the new React documentation for [`useTransition`](https://beta.reactjs.org/reference/react/useTransition).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```js
@ -672,7 +672,7 @@ function App() {
> Try the new React documentation for [`useId`](https://beta.reactjs.org/reference/react/useId).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```js
@ -733,7 +733,7 @@ The following Hooks are provided for library authors to integrate libraries deep
> Try the new React documentation for [`useSyncExternalStore`](https://beta.reactjs.org/reference/react/useSyncExternalStore).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```js
@ -784,7 +784,7 @@ const selectedField = useSyncExternalStore(
> Try the new React documentation for [`useInsertionEffect`](https://beta.reactjs.org/reference/react/useInsertionEffect).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```js
useInsertionEffect(didUpdate);

4
content/docs/hooks-state.md

@ -6,14 +6,14 @@ next: hooks-effect.html
prev: hooks-overview.html
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
> - [State: A Component's Memory](https://beta.reactjs.org/learn/state-a-components-memory)
> - [`useState`](https://beta.reactjs.org/reference/react/useState)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
*Hooks* are a new addition in React 16.8. They let you use state and other React features without writing a class.

4
content/docs/introducing-jsx.md

@ -6,14 +6,14 @@ prev: hello-world.html
next: rendering-elements.html
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
> - [Writing Markup with JSX](https://beta.reactjs.org/learn/writing-markup-with-jsx)
> - [JavaScript in JSX with Curly Braces](https://beta.reactjs.org/learn/javascript-in-jsx-with-curly-braces)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
Consider this variable declaration:

4
content/docs/lifting-state-up.md

@ -9,13 +9,13 @@ redirect_from:
- "docs/flux-todo-list.html"
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
> - [Sharing State Between Components](https://beta.reactjs.org/learn/sharing-state-between-components)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
Often, several components need to reflect the same changing data. We recommend lifting the shared state up to their closest common ancestor. Let's see how this works in action.

4
content/docs/lists-and-keys.md

@ -6,13 +6,13 @@ prev: conditional-rendering.html
next: forms.html
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
> - [Rendering Lists](https://beta.reactjs.org/learn/rendering-lists)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
First, let's review how you transform lists in JavaScript.

4
content/docs/portals.md

@ -4,13 +4,13 @@ title: Portals
permalink: docs/portals.html
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
> - [`createPortal`](https://beta.reactjs.org/reference/react-dom/createPortal)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
Portals provide a first-class way to render children into a DOM node that exists outside the DOM hierarchy of the parent component.

4
content/docs/reconciliation.md

@ -4,13 +4,13 @@ title: Reconciliation
permalink: docs/reconciliation.html
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
> - [Preserving and Resetting State](https://beta.reactjs.org/learn/preserving-and-resetting-state)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
React provides a declarative API so that you don't have to worry about exactly what changes on every update. This makes writing applications a lot easier, but it might not be obvious how this is implemented within React. This article explains the choices we made in React's "diffing" algorithm so that component updates are predictable while being fast enough for high-performance apps.

4
content/docs/reference-dom-elements.md

@ -14,7 +14,7 @@ redirect_from:
- "tips/dangerously-set-inner-html.html"
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
@ -25,7 +25,7 @@ redirect_from:
> - [`<select>`](https://beta.reactjs.org/reference/react-dom/components/select)
> - [`<textarea>`](https://beta.reactjs.org/reference/react-dom/components/textarea)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
React implements a browser-independent DOM system for performance and cross-browser compatibility. We took the opportunity to clean up a few rough edges in browser DOM implementations.

4
content/docs/reference-events.md

@ -6,13 +6,13 @@ layout: docs
category: Reference
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
> - [Common components (e.g. `<div>`)](https://beta.reactjs.org/reference/react-dom/components/common)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
This reference guide documents the `SyntheticEvent` wrapper that forms part of React's Event System. See the [Handling Events](/docs/handling-events.html) guide to learn more.

2
content/docs/reference-react-component.md

@ -17,7 +17,7 @@ redirect_from:
> Try the new React documentation for [`Component`](https://beta.reactjs.org/reference/react/Component).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
This page contains a detailed API reference for the React component class definition. It assumes you're familiar with fundamental React concepts, such as [Components and Props](/docs/components-and-props.html), as well as [State and Lifecycle](/docs/state-and-lifecycle.html). If you're not, read them first.

4
content/docs/reference-react-dom-client.md

@ -39,7 +39,7 @@ React supports all modern browsers, although [some polyfills are required](/docs
> Try the new React documentation for [`createRoot`](https://beta.reactjs.org/reference/react-dom/client/createRoot).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```javascript
createRoot(container[, options]);
@ -76,7 +76,7 @@ root.unmount();
> Try the new React documentation for [`hydrateRoot`](https://beta.reactjs.org/reference/react-dom/client/hydrateRoot).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```javascript

12
content/docs/reference-react-dom-server.md

@ -38,7 +38,7 @@ The following methods can be used in the environments that don't support streams
> Try the new React documentation for [`renderToPipeableStream`](https://beta.reactjs.org/reference/react-dom/server/renderToPipeableStream).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```javascript
ReactDOMServer.renderToPipeableStream(element, options)
@ -97,7 +97,7 @@ See the [full list of options](https://github.com/facebook/react/blob/14c2be8dac
> Try the new React documentation for [`renderToReadableStream`](https://beta.reactjs.org/reference/react-dom/server/renderToReadableStream).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```javascript
ReactDOMServer.renderToReadableStream(element, options);
@ -158,7 +158,7 @@ See the [full list of options](https://github.com/facebook/react/blob/14c2be8dac
> Try the new React documentation for [`renderToNodeStream`](https://beta.reactjs.org/reference/react-dom/server/renderToNodeStream).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```javascript
ReactDOMServer.renderToNodeStream(element)
@ -180,7 +180,7 @@ If you call [`ReactDOM.hydrateRoot()`](/docs/react-dom-client.html#hydrateroot)
> Try the new React documentation for [`renderToStaticNodeStream`](https://beta.reactjs.org/reference/react-dom/server/renderToStaticNodeStream).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```javascript
ReactDOMServer.renderToStaticNodeStream(element)
@ -204,7 +204,7 @@ If you plan to use React on the client to make the markup interactive, do not us
> Try the new React documentation for [`renderToString`](https://beta.reactjs.org/reference/react-dom/server/renderToString).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```javascript
ReactDOMServer.renderToString(element)
@ -226,7 +226,7 @@ If you call [`ReactDOM.hydrateRoot()`](/docs/react-dom-client.html#hydrateroot)
> Try the new React documentation for [`renderToStaticMarkup`](https://beta.reactjs.org/reference/react-dom/server/renderToStaticMarkup).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```javascript
ReactDOMServer.renderToStaticMarkup(element)

12
content/docs/reference-react-dom.md

@ -52,7 +52,7 @@ React supports all modern browsers, although [some polyfills are required](/docs
> Try the new React documentation for [`createPortal`](https://beta.reactjs.org/reference/react-dom/createPortal).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```javascript
createPortal(child, container)
@ -64,7 +64,7 @@ Creates a portal. Portals provide a way to [render children into a DOM node that
> Try the new React documentation for [`flushSync`](https://beta.reactjs.org/reference/react-dom/flushSync).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```javascript
flushSync(callback)
@ -95,7 +95,7 @@ flushSync(() => {
> Try the new React documentation for [`render`](https://beta.reactjs.org/reference/react-dom/render).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```javascript
render(element, container[, callback])
@ -129,7 +129,7 @@ If the optional callback is provided, it will be executed after the component is
> Try the new React documentation for [`hydrate`](https://beta.reactjs.org/reference/react-dom/hydrate).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```javascript
hydrate(element, container[, callback])
@ -155,7 +155,7 @@ Remember to be mindful of user experience on slow connections. The JavaScript co
> Try the new React documentation for [`unmountComponentAtNode`](https://beta.reactjs.org/reference/react-dom/unmountComponentAtNode).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```javascript
unmountComponentAtNode(container)
@ -173,7 +173,7 @@ Remove a mounted React component from the DOM and clean up its event handlers an
> Try the new React documentation for [`findDOMNode`](https://beta.reactjs.org/reference/react-dom/findDOMNode).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
> Note:
>

28
content/docs/reference-react.md

@ -103,7 +103,7 @@ Suspense lets components "wait" for something before rendering. Today, Suspense
> Try the new React documentation for [`Component`](https://beta.reactjs.org/reference/react/Component).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
`React.Component` is the base class for React components when they are defined using [ES6 classes](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Classes):
@ -123,7 +123,7 @@ See the [React.Component API Reference](/docs/react-component.html) for a list o
> Try the new React documentation for [`PureComponent`](https://beta.reactjs.org/reference/react/PureComponent).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
`React.PureComponent` is similar to [`React.Component`](#reactcomponent). The difference between them is that [`React.Component`](#reactcomponent) doesn't implement [`shouldComponentUpdate()`](/docs/react-component.html#shouldcomponentupdate), but `React.PureComponent` implements it with a shallow prop and state comparison.
@ -141,7 +141,7 @@ If your React component's `render()` function renders the same result given the
> Try the new React documentation for [`memo`](https://beta.reactjs.org/reference/react/memo).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```javascript
const MyComponent = React.memo(function MyComponent(props) {
@ -183,7 +183,7 @@ This method only exists as a **[performance optimization](/docs/optimizing-perfo
> Try the new React documentation for [`createElement`](https://beta.reactjs.org/reference/react/createElement).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```javascript
React.createElement(
@ -203,7 +203,7 @@ Code written with [JSX](/docs/introducing-jsx.html) will be converted to use `Re
> Try the new React documentation for [`cloneElement`](https://beta.reactjs.org/reference/react/cloneElement).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```
React.cloneElement(
@ -231,7 +231,7 @@ This API was introduced as a replacement of the deprecated `React.addons.cloneWi
> Try the new React documentation for [`createFactory`](https://beta.reactjs.org/reference/react/createFactory).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```javascript
React.createFactory(type)
@ -249,7 +249,7 @@ You will not typically invoke `React.createFactory()` directly if you are using
> Try the new React documentation for [`isValidElement`](https://beta.reactjs.org/reference/react/isValidElement).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```javascript
React.isValidElement(object)
@ -263,7 +263,7 @@ Verifies the object is a React element. Returns `true` or `false`.
> Try the new React documentation for [`Children`](https://beta.reactjs.org/reference/react/Children).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
`React.Children` provides utilities for dealing with the `this.props.children` opaque data structure.
@ -325,7 +325,7 @@ Returns the `children` opaque data structure as a flat array with keys assigned
> Try the new React documentation for [`Fragment`](https://beta.reactjs.org/reference/react/Fragment).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
The `React.Fragment` component lets you return multiple elements in a `render()` method without creating an additional DOM element:
@ -347,7 +347,7 @@ You can also use it with the shorthand `<></>` syntax. For more information, see
> Try the new React documentation for [`createRef`](https://beta.reactjs.org/reference/react/createRef).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
`React.createRef` creates a [ref](/docs/refs-and-the-dom.html) that can be attached to React elements via the ref attribute.
`embed:16-3-release-blog-post/create-ref-example.js`
@ -356,7 +356,7 @@ You can also use it with the shorthand `<></>` syntax. For more information, see
> Try the new React documentation for [`forwardRef`](https://beta.reactjs.org/reference/react/forwardRef).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
`React.forwardRef` creates a React component that forwards the [ref](/docs/refs-and-the-dom.html) attribute it receives to another component below in the tree. This technique is not very common but is particularly useful in two scenarios:
@ -377,7 +377,7 @@ For more information, see [forwarding refs](/docs/forwarding-refs.html).
> Try the new React documentation for [`lazy`](https://beta.reactjs.org/reference/react/lazy).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
`React.lazy()` lets you define a component that is loaded dynamically. This helps reduce the bundle size to delay loading components that aren't used during the initial render.
@ -394,7 +394,7 @@ Note that rendering `lazy` components requires that there's a `<React.Suspense>`
> Try the new React documentation for [`Suspense`](https://beta.reactjs.org/reference/react/Suspense).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
`React.Suspense` lets you specify the loading indicator in case some components in the tree below it are not yet ready to render. In the future we plan to let `Suspense` handle more scenarios such as data fetching. You can read about this in [our roadmap](/blog/2018/11/27/react-16-roadmap.html).
@ -433,7 +433,7 @@ Suspense boundaries depend on their parent boundaries being hydrated before they
> Try the new React documentation for [`startTransition`](https://beta.reactjs.org/reference/react/startTransition).
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
```js
React.startTransition(callback)

4
content/docs/refs-and-the-dom.md

@ -11,7 +11,7 @@ redirect_from:
- "tips/children-undefined.html"
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
@ -20,7 +20,7 @@ redirect_from:
> - [`useRef`](https://beta.reactjs.org/reference/react/useRef)
> - [`forwardRef`](https://beta.reactjs.org/reference/react/forwardRef)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
Refs provide a way to access DOM nodes or React elements created in the render method.

4
content/docs/state-and-lifecycle.md

@ -8,14 +8,14 @@ prev: components-and-props.html
next: handling-events.html
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
> - [State: A Component's Memory](https://beta.reactjs.org/learn/state-a-components-memory)
> - [Synchronizing with Effects](https://beta.reactjs.org/learn/synchronizing-with-effects)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
This page introduces the concept of state and lifecycle in a React component. You can find a [detailed component API reference here](/docs/react-component.html).

4
content/docs/strict-mode.md

@ -4,13 +4,13 @@ title: Strict Mode
permalink: docs/strict-mode.html
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
> - [`StrictMode`](https://beta.reactjs.org/reference/react/StrictMode)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
`StrictMode` is a tool for highlighting potential problems in an application. Like `Fragment`, `StrictMode` does not render any visible UI. It activates additional checks and warnings for its descendants.

8
content/docs/thinking-in-react.md

@ -8,13 +8,11 @@ redirect_from:
prev: composition-vs-inheritance.html
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
> The updated [Thinking in React](https://beta.reactjs.org/learn/thinking-in-react) guide teaches modern React and includes live examples.
>
> - [Thinking in React](https://beta.reactjs.org/learn/thinking-in-react)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
React is, in our opinion, the premier way to build big, fast Web apps with JavaScript. It has scaled very well for us at Facebook and Instagram.

4
content/docs/uncontrolled-components.md

@ -4,7 +4,7 @@ title: Uncontrolled Components
permalink: docs/uncontrolled-components.html
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
>
@ -12,7 +12,7 @@ permalink: docs/uncontrolled-components.html
> - [`<select>`](https://beta.reactjs.org/reference/react-dom/components/select)
> - [`<textarea>`](https://beta.reactjs.org/reference/react-dom/components/textarea)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
In most cases, we recommend using [controlled components](/docs/forms.html#controlled-components) to implement forms. In a controlled component, form data is handled by a React component. The alternative is uncontrolled components, where form data is handled by the DOM itself.

8
content/tutorial/tutorial.md

@ -12,13 +12,11 @@ redirect_from:
- "docs/tutorial-zh-CN.html"
---
> Try the new React documentation for this topic.
> Try the new React documentation.
>
> These new documentation pages teach modern React and include live examples:
> The updated [Tutorial](https://beta.reactjs.org/learn/tutorial-tic-tac-toe) teaches modern React and includes live examples.
>
> - [Tutorial: Tic Tac Toe](https://beta.reactjs.org/learn/tutorial-tic-tac-toe)
>
> The new docs will soon replace this site, which will be archived. [Provide feedback here.](https://github.com/reactjs/reactjs.org/issues/3308)
> The new docs will soon replace this site, which will be archived. [Provide feedback.](https://github.com/reactjs/reactjs.org/issues/3308)
This tutorial doesn't assume any existing React knowledge.

Loading…
Cancel
Save