I have a button that toggles between two components. How do I add an animation for each component on exit? Here is my code that doesn\'t work:
export default