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

[data grid] Noisy warning, Accessing element.ref was removed in React 19 #13072

Open
scrabase opened this issue May 10, 2024 · 3 comments
Open
Labels
component: data grid This is the name of the generic UI component, not the React module! external dependency Blocked by external dependency, we can’t do anything about it

Comments

@scrabase
Copy link

scrabase commented May 10, 2024

Steps to reproduce

Link to live example: (required)

Steps:

  1. install data-grid-pro
  2. simple demo code keeps warning

Current behavior

Full error messages looks like this

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.  at Tooltip
...

Data Grid Toolbar component and Data Grid Header component toolbar keeps noisy warning.

Expected behavior

no warning.

Context

No response

Your environment

npx @mui/envinfo
System:
    OS: macOS 14.4.1
  Binaries:
    Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
    npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
    pnpm: 8.15.1 - /usr/local/bin/pnpm
  Browsers:
    Chrome: 124.0.6367.156
    Edge: Not Found
    Safari: 17.4.1
  npmPackages:
    @emotion/react: ^11.11.4 => 11.11.4 
    @emotion/styled: ^11.11.5 => 11.11.5 
    @mui/base: 5.0.0-beta.40 => 5.0.0-beta.40 
    @mui/icons-material: ^5.15.15 => 5.15.15 
    @mui/lab: 5.0.0-alpha.170 => 5.0.0-alpha.170 
    @mui/material: ^5.15.15 => 5.15.15 
    @mui/material-nextjs: ^5.15.11 => 5.15.11 
    @mui/styled-engine-sc: latest => 6.0.0-alpha.18 
    @mui/utils: ^5.15.14 => 5.15.14 
    @mui/x-data-grid: ^7.3.2 => 7.3.2 
    @mui/x-data-grid-generator:  7.3.2 
    @mui/x-data-grid-pro: ^7.3.2 => 7.3.2 
    @mui/x-date-pickers: ^7.3.2 => 7.3.2 
    @mui/x-date-pickers-pro: ^7.3.2 => 7.3.2 
    @mui/x-license: ^7.1.1 => 7.2.0 
    @types/react: ^18 => 18.3.1 
    react: ^18 => 18.3.1 
    react-dom: ^18 => 18.3.1 
    typescript: ^5 => 5.4.5 
npx next info
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000
  Available memory (MB): 65536
  Available CPU cores: 10
Binaries:
  Node: 20.12.2
  npm: 10.5.0
  Yarn: 1.22.18
  pnpm: 8.15.1
Relevant Packages:
  next: 14.3.0-canary.51 // There is a newer canary version (14.3.0-canary.54) available, please upgrade! 
  eslint-config-next: 14.1.4
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5

Search keywords: Tooltip, element.ref, react19

@scrabase scrabase added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label May 10, 2024
@scrabase
Copy link
Author

It seems that this warning only occured when using nextjs canary version (v14.3.0-canary.54)
Latest nextjs version(14.2.3) has no warning

@zannager zannager added the component: data grid This is the name of the generic UI component, not the React module! label May 10, 2024
@flaviendelangle
Copy link
Member

It's probably related to React 18.3 which introduces warning for APIs deprecated and removed in React 19
We are working toward supporting React 19 so those warnings should go away in the coming weeks 👍

@michelengelen michelengelen changed the title [Data Grid] Noisy warning, Accessing element.ref was removed in React 19 [data frid] Noisy warning, Accessing element.ref was removed in React 19 May 13, 2024
@michelengelen
Copy link
Member

Let's keep this on the board to track it. 👍🏼

@michelengelen michelengelen changed the title [data frid] Noisy warning, Accessing element.ref was removed in React 19 [data grid] Noisy warning, Accessing element.ref was removed in React 19 May 13, 2024
@michelengelen michelengelen added external dependency Blocked by external dependency, we can’t do anything about it and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! external dependency Blocked by external dependency, we can’t do anything about it
Projects
None yet
Development

No branches or pull requests

4 participants