How to preserve CSS animation when state is updated?
I aim to maintain the functionality of closing all ‘details’ elements when one is selected, leaving only one open at a time. However, I’m encountering challenges with the smooth transition when updating the state. I intend to soften it using CSS, but the issue arises when the state is updated; the ‘details’ element already starts open or closed, hindering the CSS transition from occurring as desired.