popmotion icon indicating copy to clipboard operation
popmotion copied to clipboard

Pose Element does not unsubscribe parentValues on unMount 4.0.8

Open ckwong90 opened this issue 7 years ago • 0 comments

react-pose v4.0.8 https://codesandbox.io/embed/shy-framework-njgg8

The codesandbox example will test the mounting / unmounting behaviour of pose elements with parentValues.

-The red box is a pose element inside PoseGroup -The blue box is a normal pose element -the text below tracks the # of subscribers of the corresponding parentValue

The toggle button will mount / unmount both boxes

Expected the parentValues of each box to have 1 or 0 subscribers. When pose element unmounts, it should unsubscribe from the parentValue.

Bug: The # of subscribers continues to increase with each mount / unmount cycle

Note: if the toggle button is pressed quicky enough such that the PoseGroup element is mounted before it exits completely, the # of subscribers does not increase

ckwong90 avatar Jul 06 '19 10:07 ckwong90