Material-ui: Warning: Unknown prop `onTouchTap` after upgrade React to 15.2.1

Created on 20 Jul 2016  路  5Comments  路  Source: mui-org/material-ui

Problem description

After upgrade React to 15.2.1, I'm getting these warnings:

warning.js:44 Warning: Unknown prop `onTouchTap` on <span> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
    in span (created by EnhancedButton)
    in EnhancedButton (created by ListItem)
    in div (created by ListItem)
    in ListItem (created by MenuItem)
    in MenuItem (created by LeftMenu)
    in div (created by Paper)
    in Paper (created by Drawer)
    in div (created by Drawer)
warning.js:44Warning: Unknown prop `onTouchTap` on <label> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
    in label (created by TextFieldLabel)
    in TextFieldLabel (created by TextField)
    in div (created by TextField)
    in TextField (created by Login)
    in div (created by Login)
    in div (created by Paper)

It's not a big deal, the app seems to be working fine, I suppose there are some props that are not longer needed/allowed? with this upgrade.

Do I have to worry about them?

Steps to reproduce

Create a Drawer or TextField component

Versions

  • Material-UI: 0.15.2
  • React: 15.2.1
  • Browser: Chrome and Firefox (Mac OS x)

Most helpful comment

@calbertts The following code is supposed to make this warning disappear:

import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();

Although, I've installed that plugin, I've been using onClick event without any problem, so not sure if this plugin is still needed.

Are you targeting mobile devices too?

All 5 comments

@calbertts Have you installed the react-tap-event-plugin?

Yes, I have. is that causing the issue?
Althought I've installed that plugin, I've been using onClick event without any problem, so not sure if this plugins is still needed.

@calbertts The following code is supposed to make this warning disappear:

import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();

Although, I've installed that plugin, I've been using onClick event without any problem, so not sure if this plugin is still needed.

Are you targeting mobile devices too?

Yes, but I've just tested on iPhone/Chrome so far so I'm not sure if there I don't need to load the plugin.. I haven't seen any warning until I upgrade the library.

Anyway, your suggestion is correct, the warning disappeared now.

Thanks.

I'm not sure if there I don't need to load the plugin

That's another topic that is worth exploring. But it's not directly linked to this issue. I'm closing it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

newoga picture newoga  路  3Comments

FranBran picture FranBran  路  3Comments

finaiized picture finaiized  路  3Comments

revskill10 picture revskill10  路  3Comments

TimoRuetten picture TimoRuetten  路  3Comments