react icon indicating copy to clipboard operation
react copied to clipboard

Getting a warning using ReactCSSTransitionGroup in react v15.2.0

Open batusai513 opened this issue 10 years ago • 8 comments

Bug

What is the current behavior? When using ReactCSSTransitionGroup in react v15.2.0, it warns me about an unknown prop passed to the DOM element created by this component (span)

Warning: Unknown prop `transitionAppearTimeout` on <span> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
    in span (created by ReactTransitionGroup)
    in ReactTransitionGroup (created by ReactCSSTransitionGroup)
    in ReactCSSTransitionGroup (created by Element-panel)
    in Element-panel (created by Connect(Element-panel))
    in Connect(Element-panel) (created by Diagrammer-page)
    in div (created by Diagrammer-page)
    in Diagrammer-page (created by Connect(Diagrammer-page))
    in Connect(Diagrammer-page) (created by Constructor)
    in Constructor (created by Connect(Constructor))
    in Connect(Constructor) (created by Diagram-edit)
    in Diagram-edit (created by RouterContext)
    in div (created by model-layout)
    in model-layout (created by RouterContext)
    in RouterContext (created by Router)
    in Router (created by App)
    in Provider (created by App)
    in App
    in AppContainer

Demo https://jsfiddle.net/vrs7mmjL/

What is the expected behavior?

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

React V 15.0.2 OS: tested on OSX El capitan It worked on previous versions

batusai513 avatar Jul 01 '16 19:07 batusai513

Yea, looks like #6800 missed this. Would you like to send a PR to fix it? A delete should be added here.

(Yes, it’s a real prop.)

gaearon avatar Jul 01 '16 19:07 gaearon

@gaearon sure, i'm working on that ATM

batusai513 avatar Jul 01 '16 19:07 batusai513

@gaearon, done in #7165

batusai513 avatar Jul 01 '16 20:07 batusai513

Thanks! Please sign the CLA & it’s good to go.

gaearon avatar Jul 01 '16 20:07 gaearon

@gaearon done

batusai513 avatar Jul 01 '16 20:07 batusai513

I am seeing similar errors.

Unknown props onTouchTap, transitionEnabled on div tag. Remove these props from the element. For details, see https://fb.me/react-unknown-prop

Would the fix resolve this warning as well?

Sridatta7 avatar Jul 03 '16 06:07 Sridatta7

@Sridatta7 No. Those properties are not part of ReactCSSTransitionGroup's API, so you're most likely getting the warning from somewhere else.

Either you need to filter them out from the component utilizing them before passing the props to the underlying DOM element, or if it's a third party component you have to raise the issue with that maintainer.

In case you didn't read the link in the warning I suggest you do that first, as it explains the problem pretty well. If you're still confused, come join us in reactiflux and we can help you out :)

simonkberg avatar Jul 03 '16 11:07 simonkberg

This was fixed by #7165 and will be out in 15.2.1 when it ships. (We might want to wait a few days in case other extra warnings are discovered.)

gaearon avatar Jul 03 '16 22:07 gaearon