react-css-transition icon indicating copy to clipboard operation
react-css-transition copied to clipboard

Uncaught Error: CSSTransition.getChildContext()

Open jrmyio opened this issue 8 years ago • 11 comments

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.

jrmyio avatar Jul 27 '17 20:07 jrmyio

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

RyanWarner avatar Oct 16 '17 16:10 RyanWarner

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

loren-magnuson avatar Nov 01 '17 09:11 loren-magnuson

Same here

antoniobrandao avatar Dec 07 '17 19:12 antoniobrandao

thx ConneXNL, your temp fix work like charm.

shcheuk avatar Dec 11 '17 06:12 shcheuk

Same trouble ((

coderbit-net avatar Dec 11 '17 11:12 coderbit-net

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

makis-spy avatar Mar 18 '18 18:03 makis-spy

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

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

antoniobrandao avatar Mar 18 '18 22:03 antoniobrandao

@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!

makis-spy avatar Mar 19 '18 15:03 makis-spy

@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
}

antoniobrandao avatar Mar 19 '18 15:03 antoniobrandao

@antoniobrandao O M G mate you rule thank you!

makis-spy avatar Mar 19 '18 16:03 makis-spy

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?

makis-spy avatar Jan 31 '19 07:01 makis-spy