CSSTransition HoC for reusable modals which render through a React Portal

29 Views Asked by At

I've written a simple useModal hook which allows me to quickly put together a modal using dynamic content. It works great and all but now there's a problem: I've used the excellent CSSTransition library to introduce some subtle animations when showing/hiding the modal;

However the animation is not working and I'm struggling to figure out why. I've put together a very small code sample to showcase the problem and help you help me.

Thanks in advance

codesandbox sample

0

There are 0 best solutions below