tleunen / react-mdl

React Components for Material Design Lite
https://tleunen.github.io/react-mdl/
MIT License
1.76k stars 255 forks source link

Unknown Prop Warnings after upgrade to react@15.2.1 #348

Closed tb closed 8 years ago

tb commented 8 years ago

After upgrade from react@15.1 to react@15.2.1 I started to get warnings like:

warning.js?8a56:44Warning: Unknown prop `nospacing` on <div> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
in div (created by Grid)
in Grid (created by Groups)
in div (created by Groups)
in Groups (created by Connect(Groups))
in Connect(Groups) (created by General)
in div (created by General)
in General (created by RouterContext)
in div (created by Cell)
in Cell (created by App)
in div (created by Grid)
in Grid (created by App)
in div (created by Content)
in Content (created by App)
in div (created by Layout)
in div (created by Layout)
in MDLComponent (created by Layout)
in Layout (created by App)

warning.js?8a56:44Warning: Unknown props `validations`, `validationErrors`, `validationError` on <input> tag. Remove these props from the element. For details, see https://fb.me/react-unknown-prop
in input (created by TextField)
in div (created by TextField)
in TextField (created by FormsyText)
in FormsyText (created by Groups)
in div (created by Cell)
in Cell (created by Groups)
in div (created by Grid)
in Grid (created by Groups)
in form (created by Formsy)
in Formsy (created by Groups)
in div (created by Groups)
in Groups (created by Connect(Groups))
in Connect(Groups) (created by General)
in div (created by General)
in General (created by RouterContext)
in div (created by Cell)
in Cell (created by App)
in div (created by Grid)
in Grid (created by App)
in div (created by Content)
in Content (created by App)
in div (created by Layout)
in div (created by Layout)
in MDLComponent (created by Layout)
in Layout (created by App)

warning.js?8a56:44Warning: Unknown props `rippleColor`, `onParentShouldUpdate` on <input> tag. Remove these props from the element. For details, see https://fb.me/react-unknown-prop
in input (created by EnhancedSwitch)
in div (created by EnhancedSwitch)
in EnhancedSwitch (created by Toggle)
in Toggle (created by Groups)
in div (created by Cell)
in Cell (created by Groups)
in div (created by Grid)
in Grid (created by Groups)
in form (created by Formsy)
in Formsy (created by Groups)
in div (created by Groups)
in Groups (created by Connect(Groups))
in Connect(Groups) (created by General)
in div (created by General)
in General (created by RouterContext)
in div (created by Cell)
in Cell (created by App)
in div (created by Grid)
in Grid (created by App)
in div (created by Content)
in Content (created by App)
in div (created by Layout)
in div (created by Layout)
in MDLComponent (created by Layout)
in Layout (created by App)
tb commented 8 years ago

Seems it will require something like https://github.com/nathanmarks/material-ui/commit/c497d13a8f769265a3f34b9b5d3a0c20fabb40f3

tleunen commented 8 years ago

Yes. Thanks @tb I still have to go through each component and see what are the ones causing an issue with this new warning. But in the meantime, it won't produce any UI issues.

Not sure yet which solution would be the best between:

When you use a minifier to remove "unused variables" I don't know what would be the result when the unused variable is inside a destructuring assignment.

igorsantos07 commented 8 years ago

I've got a similar one here, but sounds to be a breaking issue instead of those:

warning.js?8a56:44Warning: Unknown prop `ripple` on <div> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
    in div (created by Tabs)
    in Tabs (created by NavigationBar)
    in NavigationBar (created by MainLayout)
    in header (created by MainLayout)
    in div (created by MainLayout)
    in MainLayout (created by RouterContext)
    in RouterContext (created by Router)
    in Router

That renders my Tabs without any effects :( I'm running React 15.3, but the error still happens when I downgraded to 15.1.

tleunen commented 8 years ago

The ripple in tabs has been fixed in #376.

For the unknown proprs mentioned by @tb, most of them seems to be from your own app :/ Co I'm closing the issue for now.