Hacker Newsnew | past | comments | ask | show | jobs | submitlogin



The "Transitioning elements on DOM addition and removal" example in that article uses a setTimeout() to wait an extra 1000 milliseconds before removing the element from the DOM. If you immediately remove the element from the DOM (like would usually happen if you do {isOpen && <Modal />} in React), it'll vanish immediately and won't have time to play the transition.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: