Skip to content

Commit

Permalink
Document why
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed May 25, 2020
1 parent c3d462a commit f871c76
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/material-ui/src/utils/createSvgIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export default function createSvgIcon(path, displayName) {
);

if (process.env.NODE_ENV !== 'production') {
// Need to set `displayName` on the inner component for React.memo.
// React prior to 16.14 ignores `displayName` on the wrapper.
Component.displayName = `${displayName}Icon`;
}

Expand Down

0 comments on commit f871c76

Please sign in to comment.