CSSTransition module not loading

(Matt Saunders) #1

I’m trying to install react-transition-group (https://github.com/reactjs/react-transition-group) but the instructions on the repo are not very clear. I’ve managed - I think - to install it because the folder is present inside node_modules.

I’m importing it in my file using: import { CSSTransition, TransitionGroup } from 'react-transition-group'

And them am using it like so:

const PageFade = (props) => (

But am getting an error which highlights <CSSTransition… :

React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in.

It is almost certainly installed and I’m definitely importing it correctly - so why is this not working?