Skip to content

Commit

Permalink
Added good practices
Browse files Browse the repository at this point in the history
  • Loading branch information
djhi committed Feb 26, 2019
1 parent 64a265e commit fbd1f9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/Theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ import { withRouter } from 'react-router-dom';
const MyMenu = ({ resources, onMenuClick, logout }) => (
<div>
{resources.map(resource => (
<MenuItemLink to={`/${resource.name}`} primaryText={resource.name} onClick={onMenuClick} />
<MenuItemLink key={resource.name} to={`/${resource.name}`} primaryText={resource.name} onClick={onMenuClick} />
))}
<MenuItemLink to="/custom-route" primaryText="Miscellaneous" onClick={onMenuClick} />
<Responsive
Expand Down Expand Up @@ -745,7 +745,7 @@ const styles = {
const MyMenu = ({ classes, resources, onMenuClick, logout }) => (
<div>
{resources.map(resource => (
<MenuItemLink classes={classes} to={`/${resource.name}`} primaryText={resource.name} onClick={onMenuClick} />
<MenuItemLink classes={classes} key={resource.name} to={`/${resource.name}`} primaryText={resource.name} onClick={onMenuClick} />
))}
<MenuItemLink classes={classes} to="/custom-route" primaryText="Miscellaneous" onClick={onMenuClick} />
<Responsive
Expand Down

0 comments on commit fbd1f9a

Please sign in to comment.