diff --git a/content/docs/components-and-props.md b/content/docs/components-and-props.md index 92661b9d..72a12883 100644 --- a/content/docs/components-and-props.md +++ b/content/docs/components-and-props.md @@ -16,6 +16,16 @@ prev: rendering-elements.html next: state-and-lifecycle.html --- +> Try the new React documentation for this topic. +> +> 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) + 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). Conceptually, components are like JavaScript functions. They accept arbitrary inputs (called "props") and return React elements describing what should appear on the screen. diff --git a/content/docs/conditional-rendering.md b/content/docs/conditional-rendering.md index d8c01b1e..a000a447 100644 --- a/content/docs/conditional-rendering.md +++ b/content/docs/conditional-rendering.md @@ -8,6 +8,15 @@ redirect_from: - "tips/false-in-jsx.html" --- +> Try the new React documentation for this topic. +> +> 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) + + 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. Conditional rendering in React works the same way conditions work in JavaScript. Use JavaScript operators like [`if`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) or the [conditional operator](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Conditional_Operator) to create elements representing the current state, and let React update the UI to match them. diff --git a/content/docs/context.md b/content/docs/context.md index 0fa5868d..65043645 100644 --- a/content/docs/context.md +++ b/content/docs/context.md @@ -4,6 +4,15 @@ title: Context permalink: docs/context.html --- +> Try the new React documentation for this topic. +> +> 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) + Context provides a way to pass data through the component tree without having to pass props down manually at every level. In a typical React application, data is passed top-down (parent to child) via props, but such usage can be cumbersome for certain types of props (e.g. locale preference, UI theme) that are required by many components within an application. Context provides a way to share values like these between components without having to explicitly pass a prop through every level of the tree. diff --git a/content/docs/forms.md b/content/docs/forms.md index 08344f4b..f0600e8e 100644 --- a/content/docs/forms.md +++ b/content/docs/forms.md @@ -9,6 +9,16 @@ redirect_from: - "docs/forms-zh-CN.html" --- +> Try the new React documentation for this topic. +> +> These new documentation pages teach modern React and include live examples: +> +> - [``](https://beta.reactjs.org/reference/react-dom/components/input) +> - [`