Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Grid] Infer displayName #18481

Merged
merged 1 commit into from
Nov 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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