Material-ui-pickers: React does not recognize the `nodeRef` prop on a DOM element

Created on 18 May 2020  路  16Comments  路  Source: mui-org/material-ui-pickers

Environment

| Tech | Version |
| -------------------- | ------- |
| @material-ui/pickers | 3.2.10 |
| material-ui | 4.9.14 |
| TypeScript | 3.7.5 |
| React | ^16.12.0 |
| Browser | ^16.12.0 |
| date-fns | 2.13.0 |
| @date-io/date-fns | 1.3.13 |

Steps to reproduce

  1. Click to open the Modal
  2. Look at the console

Expected behavior

Modal open with no warning on the console

Actual behavior

Component works correctly but the following warning is shown on the console:

Warning: React does not recognize the `nodeRef` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `noderef` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

Live example

https://codesandbox.io/s/eslint-codesandbox-qu2mi?file=/src/App.tsx

image

incomplete

Most helpful comment

This issue is caused by an outdated version of react-transition-group. Updating to v4.4.0 in your project should fix it.

All 16 comments

@giovanniantonaccio We do no longer support v3. Do you have a reproduction with v4?

@oliviertassinari thanks for your answer! Do you already recommend upgrading to v4?
If not, any ideas on when it will be available?

@giovanniantonaccio I think that you can already upgrade to v4. There are a couple more of breaking changes coming down the road, but we have definitely made progress since v3.

@oliviertassinari I am already using version v4 and I am experiencing the same error.

Do you have a reproduction?

@oliviertassinari yes. Getting that error for Dialog boxes

I'm actually seeing this error too, but when I follow the stack trace, the only module thats using it is Slide.js

image

It does seem to be related to transition, as shown in the screenshot of slide.js's code

Please provide a full reproduction test case with the latest version (v4.0.0-alpha.7). This would help a lot 馃懛 .
A live example would be perfect. This codesandbox.io template _may_ be a good starting point. Thank you!

This is my first time ever, so I hope it works :) Live example of the issue.

https://codesandbox.io/live/YE24pp

Also, forgive me for a little bit unnecessary (me thinks) amount of detail in the example, but it does show the issue in the context of a relatively elaborate workflow.

i'm getting this error with MUI core 4.11.0 and it appears to be related to the Transition component. downgrading to our previous 4.8.3 fixes the issue.

image

This issue is caused by an outdated version of react-transition-group. Updating to v4.4.0 in your project should fix it.

Thanks @arttuka This fix, worked for me.

I was getting this exact error after updating to MUI ^4.9.0 (from ^4.3.0), and still using react-transistion-group 4.1.1.

_Updating react-transistion-group to ^4.4.0 removed the error from the secondary ThemeProvider component, completely._

MUI: 4.11.0
react-transistion-group: 4.4.1

And the issue still exists. :(

Explicitly install [email protected] fixed my issue.

Is this solved in v5?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Lysander picture Lysander  路  3Comments

benneq picture benneq  路  3Comments

brett-patterson picture brett-patterson  路  3Comments

mnemanja picture mnemanja  路  3Comments

danmce picture danmce  路  3Comments