I am using NPM to manage my packages and modules on my node.js app.
I have updated react to ^0.14.6 version and also installed ReactCSSTransitionGroups via npm.
Unfortunately uppon trying to use this addon in one of my child ponents I face the following error which says that its still undefined:
Uncaught ReferenceError: ReactCSSTransitionGroup is not defined
My implementation code:
import React from 'react';
import CSSTransitionGroup from 'react-addons-css-transition-group';
Usage is within a maping function:
...
return(
<ReactCSSTransitionGroup transitionName="example">
{Content}
</ReactCSSTransitionGroup>
);
...
Does anyone know how to fix this?
I am using NPM to manage my packages and modules on my node.js app.
I have updated react to ^0.14.6 version and also installed ReactCSSTransitionGroups via npm.
Unfortunately uppon trying to use this addon in one of my child ponents I face the following error which says that its still undefined:
Uncaught ReferenceError: ReactCSSTransitionGroup is not defined
My implementation code:
import React from 'react';
import CSSTransitionGroup from 'react-addons-css-transition-group';
Usage is within a maping function:
...
return(
<ReactCSSTransitionGroup transitionName="example">
{Content}
</ReactCSSTransitionGroup>
);
...
Does anyone know how to fix this?
Share Improve this question edited Jan 7, 2016 at 19:55 noa-dev asked Jan 7, 2016 at 19:47 noa-devnoa-dev 3,6419 gold badges35 silver badges73 bronze badges2 Answers
Reset to default 15import ReactCSSTransitionGroup from 'react/lib/ReactCSSTransitionGroup';
you should import like this.
You're importing CSSTransitionGroup
but using ReactCSSTransitionGroup
. Switch one or the other so the variable lines up.