I installed react-transition-group 1x baesd on the documentation
but i gut this error
Attempted import error: 'CSSTransitionGroup' is not exported from 'react-transition-group'.
here my code
import React, { useState } from 'react'
import './Toggle.css'
import { CSSTransitionGroup } from 'react-transition-group' // ES6
const TitleToggle = () => {
const [ isVisible, setVisisblity ] = useState(false)
return (
+1 for me, although I am using Typescript and installing types in this way did solve it:
npm install @types/[email protected]
I'm experiencing the same issue and got the same error message even with npm install @types/[email protected] .
Just for info type CSSTransitionGroup does not exist in last release it is named: TransitionGroup
From reading the docs CSSTransitionGroup and TransitionGroup are different.
Are there any updates so far?
Are there any updates so far?
I don't know if you're still having issue, but I found this and it seems to be working fine for me...
Here
I was having this issue too. I think the problem was that I had other dependencies that were installing the latest version of react-transition-group. So I installed v1 as an alias:
yarn add react-transition-group-v1@npm:[email protected]
And required it like this:
import { CSSTransitionGroup } from 'react-transition-group-v1'
For typescript i had issue as well and solve it by upgrading to new version
npm i @types/[email protected] seems to work for me
The documentation on the main page hasn't been updated (is this package being maintained anymore?).
I found this guide helpful instead: https://github.com/reactjs/react-transition-group/blob/70d1314d185e152b7754ab363e0ae088409858d5/Migration.md
You can use Framer-Motion more stable and better this days for animation..
Most helpful comment
Are there any updates so far?