From b60b68b29d812020406beed53a601798aaffd1ce Mon Sep 17 00:00:00 2001 From: Chad Fawcett Date: Wed, 11 May 2016 12:08:22 -0700 Subject: [PATCH] Add information on JSX element keys --- docs/docs/02.3-jsx-gotchas.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/02.3-jsx-gotchas.md b/docs/docs/02.3-jsx-gotchas.md index 10ae6bcf0cac..ce6deee71168 100644 --- a/docs/docs/02.3-jsx-gotchas.md +++ b/docs/docs/02.3-jsx-gotchas.md @@ -40,10 +40,10 @@ A safer alternative is to find the [unicode number corresponding to the entity](
{'First ' + String.fromCharCode(183) + ' Second'}
``` -You can use mixed arrays with strings and JSX elements. +You can use mixed arrays with strings and JSX elements. Each JSX element in the array needs a unique key. ```javascript -
{['First ', ·, ' Second']}
+
{['First ', ·, ' Second']}
``` As a last resort, you always have the ability to [insert raw HTML](/react/tips/dangerously-set-inner-html.html).