mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
4.08k stars 1.26k forks source link

[data grid] Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release #13432

Closed MessiDaGod closed 3 months ago

MessiDaGod commented 3 months ago

Steps to reproduce

Link to live example: https://github.com/MessiDaGod/react-hydration-error

Steps to reproduce

  1. install

    yarn install
  2. start

    yarn start
  3. Table rendering Screenshot 2024-06-09 125819

  4. Dev tools error Screenshot

Current behavior

logging error to console

Expected behavior

not logging error to console

Context

get rid of annoying error, eventually fixing the root issue of ref now being a regular prop in react 19

Your environment

System: OS: Windows 11 10.0.22631 Binaries: Node: 20.14.0 - C:\Program Files\nodejs\node.EXE npm: 10.8.1 - D:\repos\react-hydration-error\node_modules.bin\npm.CMD pnpm: 8.15.7 - ~\AppData\Local\pnpm\pnpm.CMD Browsers: Chrome: Not Found Edge: Chromium (125.0.2535.92) npmPackages: @emotion/react: ^11.11.4 => 11.11.4 @emotion/styled: ^11.11.5 => 11.11.5 @mui/base: 5.0.0-beta.40 @mui/core-downloads-tracker: 5.15.19 @mui/material: ^5.15.19 => 5.15.19 @mui/private-theming: 5.15.14 @mui/styled-engine: 5.15.14 @mui/system: 5.15.15 @mui/types: 7.2.14 @mui/utils: 5.15.14 @mui/x-data-grid: ^7.6.2 => 7.6.2 react: ^19.0.0-rc-cc1ec60d0d-20240607 => 19.0.0-rc-f994737d14-20240522 react-dom: ^19.0.0-rc-cc1ec60d0d-20240607 => 19.0.0-rc-f994737d14-20240522 types-react: 19.0.0-rc.0 typescript: ^5.4.5 => 5.4.5

Search keywords: element.ref React 19 React@rc react-dom@rc

michelengelen commented 3 months ago

Hey @MessiDaGod we are currently not supporting React 19, as you can see from this line in the package.json: https://github.com/mui/mui-x/blob/40e631df353f5939b7148fdb10ecdb14bdf1bf7e/packages/x-data-grid/package.json#L60

We are working on supporting it though. For information on the effort please follow #13356

github-actions[bot] commented 3 months ago

:warning: This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

@MessiDaGod: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

oliviertassinari commented 3 months ago

Root issue created https://github.com/mui/material-ui/issues/42604