Unmount react component upon detachment