mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-22 17:47:16 +00:00
Provie a key element to the chars in strings
This commit is contained in:
parent
1965879bcd
commit
8eef8e848d
1 changed files with 2 additions and 2 deletions
|
|
@ -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>;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue