core icon indicating copy to clipboard operation
core copied to clipboard

Warning: MTableHeader: Support for defaultProps will be removed from function components in a future major release

Open jalbissimo opened this issue 1 year ago • 4 comments

Describe the bug A warning appears in the console saying "Warning: MTableHeader: Support for defaultProps will be removed from function components in a future major release"

To Reproduce Have installed the following dependencies

  • "react": "18.2.0"
  • "react-dom": "18.2.0"
  • "@material-table/core": "6.2.11"
  • "@mui/material": "5.14.10",
  1. Open browser console
  2. Warning: MTableHeader: Support for defaultProps will be removed from function components in a future major release appears

Screenshots image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Google Chrome
  • Version: 121.0.6167.161

jalbissimo avatar Feb 09 '24 10:02 jalbissimo

Hello !

Got same error here with MTableBodyRow, MTableCell and more.

Using :

  • "next": "14.1.0"
  • "react": "^18"
  • "react-dom": "^18"
  • "@mui/base": "^5.0.0-beta.34"

I don't know how to help, I find this article maybe he could help.

Ggilb3rt avatar Feb 13 '24 18:02 Ggilb3rt

Same here, but it does nothing other than bother.

Using :

  • "@emotion/cache": "^11.11.0",
  • "@emotion/react": "^11.11.3",
  • "@emotion/server": "^11.11.0",
  • "@emotion/styled": "^11.11.0",
  • "@material-table/core": "^6.3.2",
  • "@mui/icons-material": "^5.15.9",
  • "@mui/material": "^5.15.9",
  • "@mui/material-nextjs": "^5.15.9",
  • "@typegoose/typegoose": "^12.1.0",
  • "dayjs": "^1.11.10",
  • "mongoose": "^8.1.1",
  • "next": "14.1.0",
  • "react": "^18",
  • "react-dom": "^18"

rodrigoverasantis avatar Feb 22 '24 00:02 rodrigoverasantis

Seems like a deprecation. If you want to work on a PR to change it to the new way to do it, you are more than welcome.

Domino987 avatar Mar 27 '24 13:03 Domino987

The deprecation warning is for React 19. React 19 is currently in beta. It is expected to be out of beta in June or July 2024. So, the person working on the PR could a) Ensure it works without defaultProps in React 18 and b) Use React 19 Beta to test compatibility.

SheldonWBM avatar May 17 '24 20:05 SheldonWBM

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

stale[bot] avatar Aug 16 '24 20:08 stale[bot]