Overview
Complex drag behaviour breaks under react strict mode. Specifically, it seems something is broken with the positionTransition and useMotionValue api.
This sandbox reproduces the issue: https://codesandbox.io/s/framer-motion-drag-to-reorder-ij014
If you remove StrictMode, the problem disappears.
Steps to reproduce
Steps to reproduce the behaviour:
Expected behaviour
In the example above, adding strict mode does not alter the behaviour of the components.
Environment details
I'm using Chrome 78.0.3904.87 (64-bit) under MacOS mojave.
Let me know If you'd like me to track this down further - didn't dig deeper than finding out strict mode was causing this problem in my application, as I figured you might have a better idea why this is occurring. If you could guide me in the right direction, i'd be happy to implement a fix as well.
Hey man I'm actually doing a deep dive into StrictMode at the moment. I think its specifically positionTransition that has the problem in general. I'll update the ticket when I get somewhere with this.
Most helpful comment
Hey man I'm actually doing a deep dive into StrictMode at the moment. I think its specifically
positionTransitionthat has the problem in general. I'll update the ticket when I get somewhere with this.