From 363f6cb2e592f2a283eac279fb393666dcb92b65 Mon Sep 17 00:00:00 2001 From: Fraser Haer Date: Tue, 18 Apr 2017 23:47:44 +1000 Subject: [PATCH] Unique headings for linking purposes (#9259) Previously two headings were 'Javascript Expressions' - now 'Javascript Expressions as Props' and 'Javascript Expressions as Children' --- docs/docs/jsx-in-depth.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/jsx-in-depth.md b/docs/docs/jsx-in-depth.md index 41c3813dd8459..c71bc68be73b2 100644 --- a/docs/docs/jsx-in-depth.md +++ b/docs/docs/jsx-in-depth.md @@ -172,7 +172,7 @@ function Story(props) { There are several different ways to specify props in JSX. -### JavaScript Expressions +### JavaScript Expressions as Props You can pass any JavaScript expression as a prop, by surrounding it with `{}`. For example, in this JSX: @@ -308,7 +308,7 @@ You can mix together different types of children, so you can use string literals A React component can't return multiple React elements, but a single JSX expression can have multiple children, so if you want a component to render multiple things you can wrap it in a `div` like this. -### JavaScript Expressions +### JavaScript Expressions as Children You can pass any JavaScript expression as children, by enclosing it within `{}`. For example, these expressions are equivalent: