Skip to content

Commit

Permalink
Refactored the <ListWidget> markup to include a presently-unique 'key…
Browse files Browse the repository at this point in the history
…' prop for each list item, to prevent React from emitting warning complaining that such a prop is missing.
  • Loading branch information
maratbn committed Aug 5, 2018
1 parent d835e40 commit 83e7ace
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webpack_in/entry.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class ListWidget extends React.Component {
<div style={ objStyleCommon }>
<div style={ objStyleContent }>
<ul style={{ display: 'inline-block' }}>
{ this.state.items.map((strItem, index) => (<li>
{ this.state.items.map((strItem, index) => (<li key={ index }>
{ strItem }
</li>)) }
</ul>
Expand Down

0 comments on commit 83e7ace

Please sign in to comment.