From d0a809a44ca88adad798b16a5ce82af9289a0f4d Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Wed, 19 Oct 2022 15:59:12 +0100 Subject: [PATCH] [Beta] Note on Children vs children --- beta/src/content/apis/react/Children.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/beta/src/content/apis/react/Children.md b/beta/src/content/apis/react/Children.md index 7297dcdb3..fc70dc6b8 100644 --- a/beta/src/content/apis/react/Children.md +++ b/beta/src/content/apis/react/Children.md @@ -365,6 +365,18 @@ As mentioned earlier, there is no way to get the rendered output of an inner com ## Alternatives {/*alternatives*/} + + +This section describes alternatives to the `Children` API (with capital `C`) that's imported like this: + +```js +import { Children } from 'react'; +``` + +Don't confuse it with [using the `children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) (lowercase `c`), which is good and encouraged. + + + ### Exposing multiple components {/*exposing-multiple-components*/} Manipulating children with the `Children` methods often leads to fragile code. When you pass children to a component in JSX, you don't usually expect the component to manipulate or transform the individual children.