reactjs - componentDidMount fires twice when using TransitionGroup for animation -
i'm using react-transition-group
in conjunction react-router-dom
animate route changes , working fine.
the issue i'm having when switching routes , need send or fetch data in componentdidmount
life-cycle hook, fires twice. i'm sure due react-transition-group
wondering if there obvious solution issue.
i discovered inserting entity in database twice, far intended behavior.
i've found issue switch
component, see github issue
basically need location
prop in wrapped switch
component.
Comments
Post a Comment