Skip to content

[9.0.0-rc.3] Event props in useSpring not containing full list of values #1008

Closed
@tim-soft

Description

@tim-soft

🐛 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions