From 5d64199bb6d5a875206cdcc552cdcb4bf32c7e97 Mon Sep 17 00:00:00 2001 From: Chad Fawcett Date: Thu, 12 May 2016 17:02:07 -0700 Subject: [PATCH] Add information on JSX element keys (#6751) --- 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 10ae6bcf0c..ce6deee711 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).