Hello,
I'm probably being an idiot, but can't figure how to import react-transition-group into my project correctly.
I've done an npm install https://github.com/reactjs/react-transition-group.git --save which works fine. Then I do import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup';
This throws a Module not found: 'react-transition-group/CSSTransitionGroup' error.
Looking into it it appears to be that in package.json that main points to lib/index.js which doesn't exist, and I guess only exists if you build the project.
So...do I need to build the project myself within my dependencies, or am I being an idiot and this is not the right way to use this project at all (more likely :))
Thanks!!
You can't really install from github directly without building it. the directory setup is different than what gets sent to npm. I suggest installing it normally with npm install react-transition-group
Gah, I didn't think it existed on npm for the stupid reason that it didn't have a README on the npm page but this GitHub repo did. Anyway, sorry, appreciate the quick reply!!
@stuartmemo
import { CSSTransitionGroup } from 'react-transition-group'
@jaywcjlove You just saved my life
Most helpful comment
@stuartmemo