Skip to content

Commit

Permalink
[Grid] Infer displayName (#18481)
Browse files Browse the repository at this point in the history
  • Loading branch information
NMinhNguyen authored and eps1lon committed Nov 21, 2019
1 parent 58f0d04 commit 320b6f9
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/material-ui/src/Grid/Grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export const styles = theme => ({
}, {}),
});

const Grid = React.forwardRef((props, ref) => {
const Grid = React.forwardRef(function Grid(props, ref) {
const {
alignContent = 'stretch',
alignItems = 'stretch',
Expand Down Expand Up @@ -245,12 +245,6 @@ const Grid = React.forwardRef((props, ref) => {
return <Component className={className} ref={ref} {...other} />;
});

if (process.env.NODE_ENV !== 'production') {
// can't use named function expression since the function body references `Grid`
// which would point to the render function instead of the actual component
Grid.displayName = 'ForwardRef(Grid)';
}

Grid.propTypes = {
/**
* Defines the `align-content` style property.
Expand Down

0 comments on commit 320b6f9

Please sign in to comment.