iamyoki / transition-hook

☄️ An extremely light-weight react transition animation hook which is simpler and easier to use than react-transition-group

Home Page:https://github.com/iamyoki/transition-hook#%EF%B8%8F-transition-hook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About `useSwitchTransition` How to watch Animate end?

23233 opened this issue · comments

commented

How to clear children style On anmiated after !

        {
                transition((_, stage: Stage) => (
                    <div
                        style={{
                            transition: '.22s',
                            opacity: stage === 'enter' ? 1 : 0,
                            transform: transformFromType?.[stage],
                            position: 'absolute',
                            width: width, 
                            height: height,
                            left: 0,
                            right: 0,
                            margin: 'auto',
                        }}
                    >
                        <Outlet />
                    </div>
                ))}