From 320b6f90db6dc65f44881ca18954261dbc1ff035 Mon Sep 17 00:00:00 2001 From: Minh Nguyen Date: Thu, 21 Nov 2019 14:03:32 +0000 Subject: [PATCH] [Grid] Infer `displayName` (#18481) --- packages/material-ui/src/Grid/Grid.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/material-ui/src/Grid/Grid.js b/packages/material-ui/src/Grid/Grid.js index 68850ea65dce19..949adc878e39a2 100644 --- a/packages/material-ui/src/Grid/Grid.js +++ b/packages/material-ui/src/Grid/Grid.js @@ -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', @@ -245,12 +245,6 @@ const Grid = React.forwardRef((props, ref) => { return ; }); -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.