I'm currently using react-transition-group
in conjunction with react-router-dom
to animate route changes and this is working fine.
The only issue I'm having is that when switching routes and I need to send or fetch some data in the componentDidMount
life-cycle hook, it get fires twice. I'm fairly sure this is due to the react-transition-group
but I was wondering if there is an obvious solution to this issue.
I discovered this as it was inserting an entity in the database twice, which is far from the intended behavior.