Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Error caused by require TransitionGroup module directly #250

Closed
yvesyao opened this issue Mar 25, 2019 · 4 comments
Closed

Error caused by require TransitionGroup module directly #250

yvesyao opened this issue Mar 25, 2019 · 4 comments

Comments

@yvesyao
Copy link

yvesyao commented Mar 25, 2019

I encountered an error today:

react.development.js:369 Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.

Check the render method of `VelocityTransitionGroup`.
    in VelocityTransitionGroup (created by TreeNode)

Then I debugged into the error part and found that VelocityTransitionGroup created a child of Object:
image

The following codes shows that this error is caused by requiring TransitionGroup module directly rather than require the default part of the module.
https://github.com/google-fabric/velocity-react/blob/v1.4.1/src/velocity-transition-group.js#L56
https://github.com/reactjs/react-transition-group/blob/v2.7.0/src/TransitionGroup.js#L169

@jmauzy
Copy link

jmauzy commented Mar 25, 2019

This appears to be related to a breaking minor bump here:
reactjs/react-transition-group#475

@joelhoelting
Copy link

I know that an update is coming soon but have you guys found any fixes for this?

@log0s
Copy link

log0s commented Mar 25, 2019

@joelhoelting For now you can just explicitly require version 2.6.1 of react-transition-group

@yvesyao
Copy link
Author

yvesyao commented Mar 26, 2019

This issue has been resolved in version 2.7.1:
reactjs/react-transition-group#475

@yvesyao yvesyao closed this as completed Mar 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants