-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
kind: bugSomething isn't workingSomething isn't working
Milestone
Description
🐛 Bug Report
Undefined is being returned for stop - the third optional return, when a callback function is passed into useSpring
To Reproduce
I have the following:
const [motion, setMotion, stopMotion] = useSpring(() => ({
transform: 'scaleX(0)',
config: { ...config.default, duration: 180000 }
}));with the jsx:
<Track>
<animated.div style={motion} />
</Track>Expected behavior
I expect that setMotion and stopMotion will be functions I can use to start and end my animations and indeed setMotion works as expected when called as:
setMotion({ transform: 'scaleX(1)' });However stopMotion keeps returning undefined.
(A clear and concise description of what you expected to happen.)
Link to repro (highly encouraged)
Here's a reproduced demo
CodeSandbox demo
Environment
react-springv8.0.4reactv16.8.0
Metadata
Metadata
Assignees
Labels
kind: bugSomething isn't workingSomething isn't working