How to Build a Retractable Sidebar with React and CSS
In developing a RetractableSidebar
component with React, there is something more important than the code on its own, even more important than the CSS trick we'll use to actualise the animation. This something is the understanding of how to carefully time the events at play. So, my goal with this post is to help you grasp the reasoning behind the development process, more than anything else, because once mastered that, the customisation of the RetractableSidebar
component will flow naturally, by giving you an enjoyable development time.