reactjs / react-transition-group

An easy way to perform animations when a React component enters or leaves the DOM
https://reactcommunity.org/react-transition-group/
Other
10.18k stars 649 forks source link

CSSTransitionGroup is not exported from 'react-transition-group'. #646

Open ariannargesi opened 4 years ago

ariannargesi commented 4 years ago

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 (

{ isVisible &&

Toggle me!

}
)

} export default TitleToggle

jason-dark commented 4 years ago

+1 for me, although I am using Typescript and installing types in this way did solve it:

npm install @types/react-transition-group@1.x

ariel-walley commented 4 years ago

I'm experiencing the same issue and got the same error message even with npm install @types/react-transition-group@1.x .

damikun commented 4 years ago

Just for info type CSSTransitionGroup does not exist in last release it is named: TransitionGroup

jauggy commented 4 years ago

From reading the docs CSSTransitionGroup and TransitionGroup are different.

kirilavdeew commented 4 years ago

Are there any updates so far?

MaribelleHGomez commented 4 years ago

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

Niicck commented 4 years ago

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:react-transition-group@1.x And required it like this: import { CSSTransitionGroup } from 'react-transition-group-v1'

Frayion commented 3 years ago

For typescript i had issue as well and solve it by upgrading to new version npm i @types/react-transition-group@2.9.0 seems to work for me

silkfire commented 3 years ago

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

damikun commented 3 years ago

You can use Framer-Motion more stable and better this days for animation..

mariaammekarishvili commented 2 years ago

try it >> http://reactcommunity.org/react-transition-group/transition