Closed
Description
🐛 Bug Report
Following up on #997
In previous releases, f
from onChange
would be an object containing all animated values at that instance
const [props, set] = useSprings(pages.length, i => ({
x: i * window.innerWidth,
scale: 1,
onChange: f => console.log(f),
}))
i.e. f
in this case would normally be
{
x: 1234,
scale: 1.2
}
In v9.0.0-rc.3, f is equal to whatever value has changed in that frame
// Scale changes 1.0 -> 1.2
f = 1.2
// x changes 1234 -> 1235
f = 1235
I'm not sure if this change was intentional or not but I think the old behavior is much more desirable/useful