Closed LexRiver closed 7 years ago
Hi, @LexRiver
If a component can hide itself, you need to move CssTransitionGroup
inside it. Something like this:
export default class Test extends Component<{ show: boolean }, any>{
onRender() {
return (
<CssTransitionGroup
appearFrom="from"
appearTo="to"
enterFrom="from"
enterTo="to"
leaveFrom="to"
leaveTo="from"
>
{ this.attrs.show? <div key="anyKey">{ this.children }</div> : null }
</CssTransitionGroup>
);
}
}
Ok, thanks. Just thought it's possible to have one global CssTransitionGroup
Hello @dfilatov
CssTransitionGroup works perfect for the list, but I'm trying to animate a component that can hide itself. Let's say I have component like this:
And I'm using it something like this:
But it doesn't work. So what is the proper way to animate this component inside CssTransitionGroup?