From 3788f5c2cf5ca3509172a52772bd7b8ca4509fb8 Mon Sep 17 00:00:00 2001 From: Rauno Freiberg Date: Tue, 13 Mar 2018 17:33:15 +0200 Subject: [PATCH 1/2] [docs] add reference to the explanation of capitalizing components --- content/docs/components-and-props.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/docs/components-and-props.md b/content/docs/components-and-props.md index 52c347d6..038145ad 100644 --- a/content/docs/components-and-props.md +++ b/content/docs/components-and-props.md @@ -90,6 +90,8 @@ Let's recap what happens in this example: >Always start component names with a capital letter. > >React treats components starting with lowercase letters as DOM tags. For example, `
` represents an HTML div tag, but `` represents a component and requires `Welcome` to be in scope. +> +>You can read more about the reasoning behind this convention [here.](https://reactjs.org/docs/jsx-in-depth.html#user-defined-components-must-be-capitalized) ## Composing Components From d9e7b42527e2b312adf8c878f9a2ca152d539eaa Mon Sep 17 00:00:00 2001 From: Alex Krolick Date: Tue, 13 Mar 2018 22:00:21 -0700 Subject: [PATCH 2/2] Update note label --- content/docs/components-and-props.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/content/docs/components-and-props.md b/content/docs/components-and-props.md index 038145ad..7c55df69 100644 --- a/content/docs/components-and-props.md +++ b/content/docs/components-and-props.md @@ -85,9 +85,7 @@ Let's recap what happens in this example: 3. Our `Welcome` component returns a `

Hello, Sara

` element as the result. 4. React DOM efficiently updates the DOM to match `

Hello, Sara

`. ->**Caveat:** -> ->Always start component names with a capital letter. +>**Note:** Always start component names with a capital letter. > >React treats components starting with lowercase letters as DOM tags. For example, `
` represents an HTML div tag, but `` represents a component and requires `Welcome` to be in scope. >