Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

Uncaught Error: CSSTransition.getChildContext() #5

Open
jrmyio opened this issue Jul 27, 2017 · 11 comments
Open

Uncaught Error: CSSTransition.getChildContext() #5

jrmyio opened this issue Jul 27, 2017 · 11 comments

Comments

@jrmyio
Copy link

jrmyio commented Jul 27, 2017

I am using React # next and I am getting an error:

Uncaught Error: CSSTransition.getChildContext(): childContextTypes must be defined in order to use getChildContext().

I temporary fixed this with:

CSSTransition.childContextTypes = {
    //child context keys
}

I am not too sure why this error occurs but it seems something has changed in react.

@RyanWarner
Copy link

RyanWarner commented Oct 16, 2017

I'm also getting this error. Do you have an example of how to define the child context keys?

@loren-magnuson
Copy link

I am getting this as well. A working example would be great.

@antoniobrandao
Copy link

Same here

@shcheuk
Copy link

shcheuk commented Dec 11, 2017

thx ConneXNL, your temp fix work like charm.

@coderbit-net
Copy link

Same trouble ((

@makis-spy
Copy link

Anyone on this? React 16+ CSSTransitionGroup same error.... one little example please if its not too much trouble. "I mean ccccmon"

@antoniobrandao
Copy link

antoniobrandao commented Mar 18, 2018

@makis-spy just add what @ConneXNL wrote above, it does work

CSSTransition.childContextTypes = {
    // this can be empty
}

@makis-spy
Copy link

@antoniobrandao thanks mate I guess i'm being a noob nit knowing how to specify the child context keys { //child context keys }

basically what @RyanWarner was asking would be great.

PS google not much help on this. Cheers!

@antoniobrandao
Copy link

antoniobrandao commented Mar 19, 2018

@makis-spy literally just put a // commented line in there, it's just that "CSSTransition.childContextTypes" has to be declared, even if it is empty.

CSSTransition.childContextTypes = {
    // this can be empty
}

@makis-spy
Copy link

@antoniobrandao O M G mate you rule thank you!

@makis-spy
Copy link

Hello all. So, before the fix mentioned above worked quite nicely but in my recent project using create-react-app and react 16.5.2
the following no longer works.

CSSTransition.childContextTypes = {
// this can be empty
}

No matter where I add it I still get a lot of warnings

Warning: CSSTransition.getChildContext(): childContextTypes must be defined in order to use getChildContext()

Any ideas or has anyone encountered and solved this issue?

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

7 participants