diff --git a/packages/vkui/src/lib/animation/useCSSTransition.ts b/packages/vkui/src/lib/animation/useCSSTransition.ts index 1193311547..ee5c0fd778 100644 --- a/packages/vkui/src/lib/animation/useCSSTransition.ts +++ b/packages/vkui/src/lib/animation/useCSSTransition.ts @@ -73,15 +73,16 @@ export const useCSSTransition = ( const ref = useRef(null); const [state, setState] = useState(() => { - if (inProp) { - if (enableAppear) { - onEnter(true); - return 'appear'; - } - return 'entered'; + if (!inProp) { + return 'exited'; + } + + if (enableAppear) { + onEnter(true); + return 'appear'; } - return 'exited'; + return 'entered'; }); const prevState = usePrevious(state);