Skip to content

Commit 320b6f9

Browse files
NMinhNguyeneps1lon
authored andcommitted
[Grid] Infer displayName (#18481)
1 parent 58f0d04 commit 320b6f9

File tree

1 file changed

+1
-7
lines changed
  • packages/material-ui/src/Grid

1 file changed

+1
-7
lines changed

packages/material-ui/src/Grid/Grid.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export const styles = theme => ({
199199
}, {}),
200200
});
201201

202-
const Grid = React.forwardRef((props, ref) => {
202+
const Grid = React.forwardRef(function Grid(props, ref) {
203203
const {
204204
alignContent = 'stretch',
205205
alignItems = 'stretch',
@@ -245,12 +245,6 @@ const Grid = React.forwardRef((props, ref) => {
245245
return <Component className={className} ref={ref} {...other} />;
246246
});
247247

248-
if (process.env.NODE_ENV !== 'production') {
249-
// can't use named function expression since the function body references `Grid`
250-
// which would point to the render function instead of the actual component
251-
Grid.displayName = 'ForwardRef(Grid)';
252-
}
253-
254248
Grid.propTypes = {
255249
/**
256250
* Defines the `align-content` style property.

0 commit comments

Comments
 (0)