google-fabric / velocity-react

React components for Velocity.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VelocityTransitionGroup throws Strict Mode warnings

hug0b opened this issue · comments

The current dependency version of react-transition-group causes React strict mode to issue the following warnings:

Warning: Legacy context API has been detected within a strict-mode tree.

The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.

Please update the following components: Transition
Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Transition which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node
    in ul (created by Context.Consumer)
    in Styled(ul) (created by TreeNode)
    in Transition (created by VelocityTransitionGroupChild)
    in VelocityTransitionGroupChild (created by VelocityTransitionGroup)
    in div (created by TransitionGroup)
    in TransitionGroup (created by VelocityTransitionGroup)```

I’m not sure this is just an issue of react-transition-group. VelocityTransitionGroup also uses findDOMNode to get the DOM node of its child. That could probably be fixed by cloning this.props.children to attach a ref to it.

I haven’t looked at anything react-transition-group is doing, however.

Maybe I'm mixing things up, I had a similar warning with a react-transition-group dependency but it might be unrelated !

I wouldn’t be surprised if it were both.