Provie a key element to the chars in strings

This commit is contained in:
Jordan Eldredge 2016-07-22 08:25:03 -07:00
parent 1965879bcd
commit 8eef8e848d

View file

@ -5,8 +5,8 @@ module.exports = (props) => {
const text = '' + props.children;
const chars = text.split('');
return <div {...props}>
{chars.map(character => {
return <Character>{character}</Character>;
{chars.map((character, index) => {
return <Character key={index + character}>{character}</Character>;
})};
</div>;
};